Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3041936imm; Mon, 28 May 2018 23:12:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL0HT78+vyeaUvyqphXpiKgAVeIl9LnzwOCOST2nvTRORaiQcm9R4u9lv/jIgSOz47cMyNS X-Received: by 2002:a62:e097:: with SMTP id d23-v6mr7223301pfm.81.1527574330586; Mon, 28 May 2018 23:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527574330; cv=none; d=google.com; s=arc-20160816; b=tG8mLp2o1exEb259KF/8J9V9AvJtWk/U9oUnIpsmSXHMsl3VsUQx2tyQp70lAgIh8+ LeZeEbcojQ8gQMroqaxWeqpMQm1Cpi4v+d1ocxxQ7gUZ/hW4j4Oor+nQ98YtRhPB8gtX dVyASkIuyYV/eS3hPU0zLiaXTFOvvzJ6RLFaRb4o+krRleFbi48JCqJDL+3KEnELcBT+ pk0/Ju9wno/0i9dM7YAc0GBP4LTFYtf5KaZZ8nsGZpONqnDjE1EgcNNZB2YC3VpIBBsn RF2yIX9t+m023W9F0vCjrbpoHpAkVn6lDDk9QaPsXPooEOvjoBxrvIp2vrTg11SBtxi6 aZfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ngGDSFWwv2nyAdvmbOxOUbmivODkEu/HwXIKHfMfqkc=; b=DRomAr5aCwASxdZejHHT4k27wYakp7NoJsf2z2KauBhUnAqthyNPv44YFEKl0EYOBP x4U9JmHK2ABG+ieGJSujm2nVvWrnwW8U5A/c/G/mU1yuivByQt/X7QZwl2ga5SJzTpHT h8ZY7CBFofgnrgyX5dcb13N1AGewzTlTHaB3tZYy4iRSRiVPiWo+wQ5fxl/OJ4GmmMlX 8xNGmmLecFSpvPZlc9UeZKb+zcjJSD42xkZZfU23XZIpbfId7rRD9yiSiS8iufB2COAi VuIXcQIzrTgA2ofx9IfdzrWTh7mriLGyg+dS8PU+lD4nibGJ+cONvrmCVyno/ZcOWnSz FpDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SydjT9EF; 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 q11-v6si24815439pgv.661.2018.05.28.23.11.56; Mon, 28 May 2018 23:12:10 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SydjT9EF; 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 S1754316AbeE2GLc (ORCPT + 99 others); Tue, 29 May 2018 02:11:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37312 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbeE2GLb (ORCPT ); Tue, 29 May 2018 02:11:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ngGDSFWwv2nyAdvmbOxOUbmivODkEu/HwXIKHfMfqkc=; b=SydjT9EFdDxgkluMgnzQ45vcU v8vVGiRk8o5k07LuB8nAflgJSot6VGpNu3+KxE63JkCm9WGW53AawRfjUptsvTQ4fUSTfItOGYDcU Q9SfrmDQPfSoal6hU5C+Eozys8GN3Np3GBaXHJ/y2w9zBQP2uhj5SpQo036bbTPvtRJHvXjA367El pzwNbDsqnjDP5A2wbTzDojzNoebpu376XpwSTAG71IGErgRH/56ZCqFNyv5c+xOGv+LLwQjpMxwcX bGFn0kJMydNgyIj9X56efE79xt5o8PDEJPGIii9zd3pi88vfCGQMHU0ymLkSKmNg7eKvd2euZFWAo Zvi7jd4dQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNXqy-0006Yz-3p; Tue, 29 May 2018 06:11:28 +0000 Date: Mon, 28 May 2018 23:11:27 -0700 From: Christoph Hellwig To: Luc Van Oostenryck Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Albert Ou , yamada.masahiro@socionext.com, michal.lkml@markovi.net Subject: Re: [PATCH] riscv: pass machine size to sparse Message-ID: <20180529061127.GA20005@infradead.org> References: <20180528163505.15698-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180528163505.15698-1-luc.vanoostenryck@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 28, 2018 at 06:35:05PM +0200, 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 when this doesn't > correspond to the target's machine size, like issuing false > warnings like: 'shift too big (32) for type unsigned long' or > is 64bit while sparse was compiled on a 32bit machine, or worse, > to not emit legitimate warnings. > > Fix this by passing the appropriate -m32/-m64 flag to sparse. Can we please move this to the common Kbuild code using the CONFIG_64BIT syombol? This really should not need boiler plate in every architecture.