From patchwork Mon May 28 16:40:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 10433813 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 C769860327 for ; Mon, 28 May 2018 16:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B82E727F9F for ; Mon, 28 May 2018 16:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACC5127FA5; Mon, 28 May 2018 16:40:31 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55D1C27F9F for ; Mon, 28 May 2018 16:40:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940191AbeE1Qk3 (ORCPT ); Mon, 28 May 2018 12:40:29 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38223 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934545AbeE1QkZ (ORCPT ); Mon, 28 May 2018 12:40:25 -0400 Received: by mail-wm0-f66.google.com with SMTP id m129-v6so33474348wmb.3; Mon, 28 May 2018 09:40:24 -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; bh=vKSrANPrEVL6hHyqihccmJTIwEr1NdZuX/Hv3DHVqP8=; b=Dqm5PHossPQHUWNXEWMEr1T8wprmo9YcRehl3TYBJ4EG9A28w1uYhN3EEfpNjVws0m yIW9xjiL5xTmWAbQru+UTaNXprKkPcfu2PtT5WqcuuXiBOikALo5twmGaq5MXasL+PNx HdAbGqRZCGMRMMLy0U5J1zyubq/Q6rL2XV3q1gaQc1K8aY8P6PXAUFr9fp1ZHCbLrk5l ByEoXC4otoQQrbjYektVpRqbB1UmRGOusgtPBtcJ0d5vTb6WtUdQuJ4zzoeZMmwRbkQ1 w0by1M0lk2+q2ljz48J2HSDiVwlW9YhbWopT62czp9Qkscn3+Of9jo0BLcfB59p8P/vW X24w== 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; bh=vKSrANPrEVL6hHyqihccmJTIwEr1NdZuX/Hv3DHVqP8=; b=rscMLNGLaGrvhksMfyezxTfy7EDlyg+9FawRatTii5d6Qi1fMH/vRZbmIonW6EQP5F +/83OZvE4CDde4Sjd081ENIkqpoQE6XcayLO4X4uYR25omKUvjKy45cNJvgtx5q7Q+JV E4v4883UrAcn+yYCVzzjeUg4mLomfYKEVYjP1kAtQ2tLfnmB8eIzNdGNSdssOZ8zzipg po13UalJnxN5/tl2fANwRus+aDW3iY/HigjXLTSrTf1MDKU1NW7ZxVwdk9+lklMzzDk/ XnnBSqTpm6JJRg7xFHqBCOOjFiefwlw4sfRA1am5fzj0/DvvXjYx08GoA//vn+W3pwXr B3wA== X-Gm-Message-State: ALKqPwfWSEAvHvnSUQYpbe1NpEATXNfJzjc+/Eh5JbZAXTdDJbQyd6/U Aq1XbFxP33/LcbYhqtxha9OE2jFO X-Google-Smtp-Source: AB8JxZrY7wjApJfAkAc8OgWu5/ERdF/44EjevydbyhPPfZDBwsmfHr4zSiFextKO0eulkyCzTcJ7Og== X-Received: by 2002:a50:b62c:: with SMTP id b41-v6mr15760076ede.255.1527525624395; Mon, 28 May 2018 09:40:24 -0700 (PDT) Received: from localhost.localdomain (252.178-246-81.adsl-dyn.isp.belgacom.be. [81.246.178.252]) by smtp.gmail.com with ESMTPSA id c15-v6sm16345137edr.78.2018.05.28.09.40.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 09:40:23 -0700 (PDT) From: Luc Van Oostenryck To: Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Luc Van Oostenryck Subject: [PATCH] sh: pass machine size to sparse Date: Mon, 28 May 2018 18:40:18 +0200 Message-Id: <20180528164018.16064-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP By default, sparse assumes a 64bit machine when compiled on x86-64 and 32bit when compiled on anything else. This can of course create all sort of problems, like issuing false warnings like: 'shift too big (32) for type unsigned long', or worse, to not emit legitimate warnings. Fix this by passing to sparse the appropriate -m32/-m64 flag Signed-off-by: Luc Van Oostenryck --- arch/sh/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 65300193b..3a195c9d5 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -206,6 +206,8 @@ ifeq ($(CONFIG_DWARF_UNWINDER),y) KBUILD_CFLAGS += -fasynchronous-unwind-tables endif +CHECKFLAGS += -m$(BITS) + libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)