Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3044879imm; Mon, 28 May 2018 23:16:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZogBmyFY2jXd68diQfpyQCRtjV2RXGrIWxxfziCEA8e3D998dOC5jZtFjjGCiNLXJH74hr6 X-Received: by 2002:a63:7f1b:: with SMTP id a27-v6mr12113273pgd.410.1527574578063; Mon, 28 May 2018 23:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527574578; cv=none; d=google.com; s=arc-20160816; b=bb5eByXxRV3Cw+JMJJYQVc9QMKOpKoY8Hq10bfoGMo+oI3lyL73IyOMW8ucJdVNbyC 5S82OraD1jCYjVKE0I7ST17Qc0tuLGa3TOH5g3BUsUKSivJCA8loKTI7NgMBYAFZQfdN VAWbLOjjbs6QAF5/E1lp8LixYrTW+m4sdTZObN1UHQ/asJ4eSHhT695hnC3Psn7+OKeo NeYIib99iFxsvKJAsJuRNg67w5To9CQ/m7YCczoRstuTxkjliFrqpEj2e1V+ODNh1ynd G1+es5f9HPaW59v3Y9NZaC2h/dzGnD8ZX6MiW2JEqTeIxoiMl1NZUrJua0znl42LsvuC oGuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=VYAsUeIaXja1zcHHJKOzP1gVkxZdqlpOEkflbkTXeMo=; b=W8JX5fMvk2DwlK4vfIRgo+Xk9vUeWQxneXCjjUBolKB2c2v1a8JJyEoBgMoUULGHeZ JG3cvrEQ8IH30xLblKlyqhV5eHa/ierV5K/Olg0d8d+cAmIZaBA/aZvTPpSDsahqQgXg /MlM9ljDYaAHUbGtqM/X1Qo7QNpqctdWa87mK1l52HfjOLw7GQr8Nesejl/v/Ah8TbtP TenW/3pSNn8yNmkNEqoLuTEPjZCAP8EY2ehz7eNF/TEEy6SrF7Y8TedxV/PGrZMN/K/P S+BOmdi7Urxa2P21aUEY4kBmUPoUC+XVhio0PShSNAes5eAkhfel5Y2bLloGDfA1Tmnf NQNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=o3NWdYQE; 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 13-v6si5100606pge.159.2018.05.28.23.16.03; Mon, 28 May 2018 23:16:18 -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=@nifty.com header.s=dec2015msa header.b=o3NWdYQE; 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 S1754394AbeE2GPY (ORCPT + 99 others); Tue, 29 May 2018 02:15:24 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:31350 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbeE2GPX (ORCPT ); Tue, 29 May 2018 02:15:23 -0400 Received: from mail-ua0-f175.google.com (mail-ua0-f175.google.com [209.85.217.175]) (authenticated) by conssluserg-02.nifty.com with ESMTP id w4T6F1GW001271 for ; Tue, 29 May 2018 15:15:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com w4T6F1GW001271 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527574501; bh=VYAsUeIaXja1zcHHJKOzP1gVkxZdqlpOEkflbkTXeMo=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=o3NWdYQEEJODezKocB8/j/F7vpLpOWdHJEOgdfSBLiMP3uFAigjfaO3XfN+SAf5s/ we2WlQZ/HQcN5LTyj7/S+YjvDqnPW8Di/wKqkR4/NgCP6Jle6CCqwI5dSrl9fFbdad e0ypZP+E1WQc7t+yA0DDiJLqtcLb+tqtoJNYjlai88QLJ0VeHwJSqLyZGaJrlLfMIu MlBR6VQs7kAp8CHmXUu4N47JLQ6BWnOairHw3pxBsS4Ys/Hx3I5w9+P9lOIXfAdNhC 3CcnYbYExhGcUDTpYysfUl4vXXJeYFtbLJNYKD8w3mUlCzw+adKBV+SKzoMGVDt/Cq rxT8OHVd12RsA== X-Nifty-SrcIP: [209.85.217.175] Received: by mail-ua0-f175.google.com with SMTP id i2-v6so9217084uah.0 for ; Mon, 28 May 2018 23:15:01 -0700 (PDT) X-Gm-Message-State: ALKqPwfbKotZGkqSe9AQoLIxvLuyrvjsnV9vNJVvMFVfmYq+XUfLhyBI YR/fogJvnxsWWDaorwyAz6Eynk0xG7sD08PkWjw= X-Received: by 2002:ab0:6aa:: with SMTP id g39-v6mr10331358uag.82.1527574500606; Mon, 28 May 2018 23:15:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:55d8:0:0:0:0:0 with HTTP; Mon, 28 May 2018 23:14:20 -0700 (PDT) In-Reply-To: <20180529061127.GA20005@infradead.org> References: <20180528163505.15698-1-luc.vanoostenryck@gmail.com> <20180529061127.GA20005@infradead.org> From: Masahiro Yamada Date: Tue, 29 May 2018 15:14:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] riscv: pass machine size to sparse To: Christoph Hellwig Cc: Luc Van Oostenryck , Palmer Dabbelt , linux-riscv@lists.infradead.org, Linux Kernel Mailing List , Albert Ou , Michal Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-05-29 15:11 GMT+09:00 Christoph Hellwig : > 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. I agree. Luc did so for -mbig/little-endian: https://patchwork.kernel.org/patch/10433957/ We should do likewise for -m32/64. -- Best Regards Masahiro Yamada