From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 778FBC43467 for ; Mon, 12 Oct 2020 08:12:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38F0E208FE for ; Mon, 12 Oct 2020 08:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728926AbgJLIMN (ORCPT ); Mon, 12 Oct 2020 04:12:13 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:33193 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbgJLIMM (ORCPT ); Mon, 12 Oct 2020 04:12:12 -0400 Received: from mail-lj1-f181.google.com ([209.85.208.181]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MfHIZ-1k0Fof3MUN-00grJn; Mon, 12 Oct 2020 10:12:10 +0200 Received: by mail-lj1-f181.google.com with SMTP id h20so16053270lji.9; Mon, 12 Oct 2020 01:12:10 -0700 (PDT) X-Gm-Message-State: AOAM5319sCPFCO1m/EFZQJETJ9qxWIAYFT+81/0dxYCqYqZCsYAotpHj dovE/s9X6YEeJ3oRZ28e9hWzxINJcNBM4O6qbAA= X-Google-Smtp-Source: ABdhPJzIbqkTuWB97PfBo7gju3+aGiKTNM1pYfIzgns4fQt7o6rczfccMS4P0CKvZwocCS9gab3dhvwjqV5QwnP1gQQ= X-Received: by 2002:a2e:83c9:: with SMTP id s9mr9732795ljh.168.1602490330242; Mon, 12 Oct 2020 01:12:10 -0700 (PDT) MIME-Version: 1.0 References: <20201001011232.4050282-1-andrew@lunn.ch> <20201001011232.4050282-2-andrew@lunn.ch> <20201002014411.GG4067422@lunn.ch> <20201005194913.GC56634@lunn.ch> <20201005210808.GE56634@lunn.ch> In-Reply-To: From: Arnd Bergmann Date: Mon, 12 Oct 2020 10:11:53 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today To: Masahiro Yamada Cc: Andrew Lunn , Nick Desaulniers , netdev , David Miller , Jakub Kicinski , Michal Marek , Rohit Maheshwari , Linux Kbuild mailing list , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Sz/4HpuF9P/8YEsnst7dQ9gcRH+VX6Ilep+tWTvxNsXk54N094a VrSB99Ayx4smNRrJirD07ho+R3ArnJAqwsomp1GmdTRZcNcMEqimGvspWQhVZgwHzxGG6Mp AtsGNl5GTzU8O9CcKwL/nBj9tXb6GWQ8XrWxACOp4vwOkLMbdPwAqFELQj2gWAoeW4ZhaO4 lXAYZyQh0EFzSWtIfiTUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:e2R8m4lqZqM=:PqQ+D/PrTk66rQSLp5Kai3 9nxGtE32LGI4bgjiuR0lmjF1US42V52PjUDuYXf0skN5+PX5ghvQ+dzwd92OMVLosFC75Pbfv mEwJ0dziobI1ubMXDHU1nscXReP9bNbWC33Z3CRZU2+M4FAqgprQuZs81NM2pjOhYqmHV3J22 Rji1NcWXCJrgRiRUBkMx8UkGvfXQWc8EUwN0QbAu4BsPSkz52iRj8gmQlxWWzwdx9BNTOG8zP kjPc0oEV1q34Xap3jGsznhKO1/c+7tV+cO1HYwHl1htYY+AEx5fN8FHO0kLlkqxIMMfbZuQby 3npTgoeiVDMew3OcnllCJj/DZCvLxZ4EDqFs87vStXFucVSLnlX5sdYZR1IFCCZLjeRspMVEE tikebACMLA2q6UdebRJmfgEq4y5pWXqPDbrhY1FppCejrveH8yHkqwjbGe4KhLPWPVq8v6sqS 93dyt86APivtsdaBUjz0e+Mp5ocle9IzEi9ALvgjbsq39dqaXnVf7nl6XYClDTmrYnXrLdRxq 7kTvDi8vsD8JvhcOatsXR+UJ/Mo9WY14mEAkcaDOKqExkNScxof/e6xSaJIQyP2nYjaNmWeJy 3JQ5MkyAy/0D5/MyLAGfkgyITemTkr7mw1+FG4tH5bWt7o1KgGckr1Xd4EJyqB48UQ8LOxMiw rbbMcH1+F+trtMyr1CVRTtOu9JzfIZ325oAp6ZMDSAQJaClNrzKmztB6WS3BAiJWSsHLEoiDf igsffxiPpud9ZMHMdRMWr/eIiPt/fzPUTJwRjNoo7LqjP7kdg8C26PMuVcrLZTBnInzk0zbMB QfWzHCMsxOp3aNmGi37Cb2ZaYNP/y6TZXzkhENFC00Extxf9aDG9W0kBcHOJZxxGxVDbEhch5 cj9o+5dpdpH0FA1Tagm+FKTHc/ogAYhgh8xkMxb/umbQmUnzkzjLVQ1ElhrDh6M71zmsdUVyB o64+PxaCFFtC3hmED0fNQenZaZHqB8VSogF0Sj1Oc2hb+k9brIWax Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On Sun, Oct 11, 2020 at 3:04 PM Masahiro Yamada wrote: > On Tue, Oct 6, 2020 at 6:08 AM Andrew Lunn wrote: > > > I am not a big fan of KBUILD_CFLAGS_W1_ > since it is ugly. > > I'd like to start with adding individual flags > like drivers/gpu/drm/i915/Makefile, and see > how difficult it would be to maintain it. I don't really like that either, to be honest, mostly because that is somewhat incompatible with my plan to move all the warning flags out the command line and into _Pragma() lines in header files. > One drawback of your approach is that > you cannot set KBUILD_CFLAGS_W1_20200930 > until you eliminate all the warnings in the > sub-directory in interest. > (i.e. all or nothing approach) > > At best, you can only work out from 'old -> new' order > because KBUILD_CFLAGS_W1_20200326 is a suer-set of > KBUILD_CFLAGS_W1_20190907, which is a suer-set of > KBUILD_CFLAGS_W1_20190617 ... > > > > If you add flags individually, you can start with > low-hanging fruits, or ones with higher priority > as Arnd mentions about -Wmissing-{declaration,prototypes}. > > > For example, you might be able to set > 'subdir-ccflags-y += -Wmissing-declarations' > to drivers/net/Makefile, while > 'subdir-ccflags-y += -Wunused-but-set-variable' > stays in drivers/net/ethernet/Makefile. I agree with the goal though. In particular it may be helpful to pick a set of warning flags to always be enabled without also setting -Wextra, which has different meanings depending on compiler version, or between gcc and clang. I wonder how different they really are, and we can probably find out from https://github.com/Barro/compiler-warnings, but I have not checked myself. Arnd