From patchwork Wed Jul 26 08:43:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9864431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EBCE36038C for ; Wed, 26 Jul 2017 08:44:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAE2928726 for ; Wed, 26 Jul 2017 08:44:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFC452872A; Wed, 26 Jul 2017 08:44:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 78DE42873B for ; Wed, 26 Jul 2017 08:44:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lYcLwqo7Ne6m/taD6G1tgontcDQZbFK85wpGPubL/RE=; b=IUEffxEnFj0z1efraENzh6CuLF gwmtfUKiQ4uHGjqBz8sSC7MYP483T7a64OQLQ2hTolmOPbLTGYxM2V/hBbdoObrWtrZFX/Q+hpdXZ 3FVh7Xr7VPQinzHU0ZhWGvdkMmwQ9KR+U75cFBV7kUcRVJjkIf5UHp15dbr4djqMGv7YupBYSmi8a beU8qcKPGQlzc5QX/ZIWv8lT4Td3SsvHYewAh36sew0Mtkk8wuAvDKRxuLH8IvCK6huUaxWH/d4iI 3etC4UZukXoZyTd+LXqNDcGFcE+ev9un23YHvih7C7D5pCG9H0gA+PMn+0Ph2vgQ2zkjlOW3rVqcQ C8vDMfbw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1daHv8-0001aw-Mc; Wed, 26 Jul 2017 08:43:54 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1daHv5-0001Zm-3m for linux-arm-kernel@lists.infradead.org; Wed, 26 Jul 2017 08:43:52 +0000 Received: by mail-wm0-x242.google.com with SMTP id r123so9698022wmb.5 for ; Wed, 26 Jul 2017 01:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fluddmZ9s2wo5Cd/afcT8XhxiBKHflDEYLQV6KsRyoE=; b=T5dnWh3gG+zkgHNW+jsYR8qnKnnNUlFnHjrwigEGzZM2Occjzc3N14qZoUoNX5Wvus O1PniB/loEdPZukv/deWKUxtG50IbKmYrlcxlUCEYnyKiTA+1Qsuqh7DJDewQ27sAFG9 HjzYp7cDKA2PZZ6L/lUO0Xi1p2mmbLo8359ws02fXXVMmOknautJob0juwD4Y5f8PEx4 vTsa5KZsWyJdo8Dff0iiAttzsUhrN3tyYku1d+2bpfomZla448fSPFdjWG6GpQf8szoA 8MXXWyZr3l3cwwt1Pm9oISCXQusTVUejBcx+Y97R4p+lz3QROwCaxN8U9aRXEQ2Na+RF +Zwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fluddmZ9s2wo5Cd/afcT8XhxiBKHflDEYLQV6KsRyoE=; b=JaLKz2n3jk/CSO3sH8PApjobiJy9lDT+V7ozjYs8TE1vK7MFY2U2KwMfaylqLD96pC bsNHe9nHzfRltG28CEwKO4312EHKdcO41JzV3P+jNhInODk2guwXsBNB/kZ5a2wYEtGv WMLgv0q6L4UVhwrliGzOZIXtlAcX51cB5NhecXKnJYXri1sGTnWQ6kZZ/HIRfn8YQ08R qIIy1hAB21edtEZ+grskM4i4QW8RGdQH6HtS44GvR6aPtQ0eHKvZJk37flQnHCJOS+IS JVqOeyowQRocf5zLCtf5zHk5sK4htk3R+B8Z075kaVEMTOdmUi8D6aWKU+M5yEt21JuD oMUw== X-Gm-Message-State: AIVw111O+t6e4GiQ/gMAqH7LJ7EjMx41LFyK0/y/vPSAzHpllMZC5fTY kxP9k1EhONRmVexkdT0= X-Received: by 10.28.109.26 with SMTP id i26mr151751wmc.64.1501058608980; Wed, 26 Jul 2017 01:43:28 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:40d0:c300:59a9:4235:c854:89c6]) by smtp.gmail.com with ESMTPSA id k23sm17648687wre.1.2017.07.26.01.43.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 01:43:28 -0700 (PDT) From: Luc Van Oostenryck To: Russell King Subject: [PATCH] arm: fix sparse flags for build on 64bit machines Date: Wed, 26 Jul 2017 10:43:05 +0200 Message-Id: <20170726084305.38537-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170726013020.GL2146@codeaurora.org> References: <20170726013020.GL2146@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170726_014351_336133_2EB8F85D X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , Luc Van Oostenryck , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP By default sparse uses the characteristics of the build machine to infer things like the wordsize. This is fine when doing native builds but for ARM it's, I suspect, very rarely the case and if the build are done on a 64bit machine we get a bunch of warnings like: 'cast truncates bits from constant value (... becomes ...)' Fix this by adding the -m32 flags for sparse. Reported-by: Stephen Boyd Signed-off-by: Luc Van Oostenryck Tested-by: Stephen Boyd --- arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 65f4e2a4e..121fd65f8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -131,7 +131,7 @@ endif KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float -CHECKFLAGS += -D__arm__ +CHECKFLAGS += -D__arm__ -m32 #Default value head-y := arch/arm/kernel/head$(MMUEXT).o