Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4553067imm; Wed, 30 May 2018 07:43:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKcjGCuiqCtIsYxNyV5Mm1+iuKlJ+ezjkLh09rlpYXOnjk9iV4FhzBimJGieUZfIO0vRoWu X-Received: by 2002:a17:902:b410:: with SMTP id x16-v6mr3150480plr.324.1527691405020; Wed, 30 May 2018 07:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527691404; cv=none; d=google.com; s=arc-20160816; b=J8ZEGQUMViyUTN2mYB3sn9DbkrowIv8wkSWbEMy21pnCHb8gki6RE86lZAXFVzfxNT TqEeSkAzJNbqe4JArU81n+d3aRP8JfJGMEqDqN2HgcN/lxrxulCTFSxXZbHq85gudEgf jPN0+m62PwFtVM/pIbqL2xOxlFwqoY1+Zygfkxcjc37j2Y5lW5rcDbYBulkRHkdbKZ2s GRo6QeSVLHFg2LVyWfHI6oqjeF2aVl86faJ4G8pI7NH/moVbdDcJH12Wxx4hCGcqjnEL AwC2ODhdNvlN3VbHsSefgMRLWETKhRyONM69CFRfYY9ETvSkuZ/h9f/b+c111IDnqzup Z4FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=iiigMIGWIHRdnRD+GSY7n0t0AEtadAD77rfjr9I0Yrk=; b=QgScrbHBlvfoeMMTXXLazrTnCR4P0bC/mDAgtXdFcH5rrXka4b+H0YbPl+kjL0q6Wp wSufEILRvNPlzanzYi2d+sw5J5pzwCjh4ptqyR3Ujaf9k+REcnvnS0FDS0/CsKCMfvhk KSdlFmIKXcNuaQqTNEKiqKv8V2yPKhzhV9I5xssxjmLqwWEAhaEOzoRUWhFIMGOlH5gI fLLrP1oezCcUUY8fsx9o8nkVmfW85x1TeVI1fdZBkEsaxMxZLbBA2ZUqaaC24kIvHJVf V8+YTPcR1XnLdVGq5frEz8wwgm3iKBnh52YWd1bZoQpeVpcG7tlXBIW0CyNn4gpZhbj4 CrHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=OxsutYly; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w189-v6si14013461pgb.431.2018.05.30.07.43.10; Wed, 30 May 2018 07:43:24 -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=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=OxsutYly; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbeE3Oli (ORCPT + 99 others); Wed, 30 May 2018 10:41:38 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:39552 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478AbeE3Old (ORCPT ); Wed, 30 May 2018 10:41:33 -0400 Received: by mail-it0-f52.google.com with SMTP id c3-v6so23739394itj.4 for ; Wed, 30 May 2018 07:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iiigMIGWIHRdnRD+GSY7n0t0AEtadAD77rfjr9I0Yrk=; b=OxsutYlySOCfpxXbi4fTyRHFoy7NOZqpX8QAvDjkKuJMOLJHjBCaH9JisdASQcub/7 nrMur4rj63d3BVpEgpmvd2N9yFJlg/QiH3KC6vdt8crBSR1yjginnZmR2fBMicrIG+Pr hFi+hdjnSgMW7QUaaNY5STIbUmQv3L+dmdzGv75yJ+6yg2rUudAjhrrFwklz3lb1ma5j 7+Q9M9/QMagPckyCEMSVwG5gBwT+POz1EHYVf5hinGGC4VCnxD47LmG0v65u7M7xmE+a L0d9kTFAST2Os6787Sl6sG24TOu8UsAGipEDxZujuPI6nyFCKXOZqDTfaVLyWkehmPi1 x4Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iiigMIGWIHRdnRD+GSY7n0t0AEtadAD77rfjr9I0Yrk=; b=P/J95kLjhICvCwoQqOIHYRtV+wPSeZjh7z+gftfLhZ4WgxyenmOlPMcFCButeuoD+1 ssNNDcNABYzTz0AxfTghvIpqium36iaHdUie1Hooeotw5Gd/CU06q5i9oH/yVPQ/LrGw IXMSo+/Gnv6vshFPfFwlVsBT8tj5IDiPwA7V1u7rnvTQm8PLc8G1Fr+Pr34wNK1Zg5OG lwCGTXXlAImpDyxC9vSrHwqsjvmdvdJLMkywhFDU07C6sGbkZsraJ7OdCQg+JqPfXxP4 vHZrh2mMjpqEJs8w+RjS8+2BQlDGKUNlSheOFhP4Es7+3Wk/K+2wolPxmztoM0kMI2e4 RV4Q== X-Gm-Message-State: ALKqPwfB49JjRxiMy7xJoSwI/05eswSeIPgoraT7IPedYsh8MjUNAx6y hAv5yEwm/pJ7Pz2pFRbrEtytnHbfuyE= X-Received: by 2002:a24:cc83:: with SMTP id x125-v6mr1976112itf.120.1527691292819; Wed, 30 May 2018 07:41:32 -0700 (PDT) Received: from [192.168.42.184] ([172.58.142.206]) by smtp.googlemail.com with ESMTPSA id v127-v6sm596063itc.3.2018.05.30.07.41.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 07:41:32 -0700 (PDT) Subject: Re: [PATCH] sh: pass machine size to sparse To: Luc Van Oostenryck , Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180528164018.16064-1-luc.vanoostenryck@gmail.com> From: Rob Landley Message-ID: Date: Wed, 30 May 2018 09:41:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180528164018.16064-1-luc.vanoostenryck@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/28/2018 11:40 AM, Luc Van Oostenryck wrote: > 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 $ ${CROSS_COMPILE}gcc -E -dM - < /dev/null | grep __SIZEOF_LONG__ #define __SIZEOF_LONG__ 8 You can ask the compiler, you don't need to redundantly add this to every architecture's Makefile. Rob