Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2523715imm; Mon, 28 May 2018 09:42:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrYKKG6aMIwIr+QoO77+F5sjns5NkG1oCa6JN6nJRECRGZRavFs2yIQArcI4XOnaPDO8QZa X-Received: by 2002:a17:902:2f43:: with SMTP id s61-v6mr14289199plb.274.1527525755182; Mon, 28 May 2018 09:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525755; cv=none; d=google.com; s=arc-20160816; b=l4O1omWKqcR3EGuoc2HjKsXveDc0oeb69Y6b83NI/wEjhn3aB6cpdXJJBhBoOm+rdo f31WSTN1C+1fYwmAcnT8m9fWzrJPIRJgeB6O6ufO3FaHTEXaxJZyE+bNOzE7iuo8GUSn IymWDtK7/LH4YITfV3MQENTI9MNQxN/sCJV8dr4yl4tZqVllWVUQFh7jFhYkkOwMT8eP 6TVWGZyGVddIc5Wc2OwpRlLEBBCkazfJHbDxsuCH5Akq70cqWuVC8BLDyq8EHojmCqeH Y2yl56Fau+4b6EKdMCH+HM8D0ydpde2ChxAE0UytXBqFk1ug4hpC9j3vm6e6Dot8BKpP UGiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=vKSrANPrEVL6hHyqihccmJTIwEr1NdZuX/Hv3DHVqP8=; b=gfP3WD/fIrYhz8CiYhl58GecMNLQbGk640ZzeZt9pH0WpDAVOhs0dG1vvUOiHdeAqS pDNdfvRsITMHrUCXfnqOs5IXQ5T9f9QFb3ZHCoogpbEc51IydLT8SpvMhNszVrEBIECO /f5zftRNzehP8to5qg0g1sKf1HlTm6Eo4pYGepLFMf1dh2i+S+aWR0cGU9NDWOo6dEjt GbkrKonUKS8fuoehVne/Phn/yMFvA5+iTpRd3iN6YtJqmG6IKZVtSlsDR5ttAgYY496c kvC6pQe2Xgu36OPkvYcetGyvcLui+gjqsnCiykYjBSEOFoLxV1ptbIUtVJgB59VXFtM7 i6cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dqm5PHos; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13-v6si32104574pfc.333.2018.05.28.09.41.50; Mon, 28 May 2018 09:42:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dqm5PHos; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940259AbeE1Qkd (ORCPT + 99 others); Mon, 28 May 2018 12:40:33 -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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.17.0