linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	llvm@lists.linux.dev, Jonathan Corbet <corbet@lwn.net>,
	Federico Vaga <federico.vaga@vaga.pv.it>,
	Alex Shi <alexs@kernel.org>, Hu Haowen <src.res@email.cn>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-doc-tw-discuss@lists.sourceforge.net,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11
Date: Mon, 28 Feb 2022 14:19:11 +0100	[thread overview]
Message-ID: <20220228131911.GH12643@twin.jikos.cz> (raw)
In-Reply-To: <CAK8P3a1YUR4BNu8Nrc5XW+sFjL7-hWTHh7kstV27wmj1aqc4vA@mail.gmail.com>

On Mon, Feb 28, 2022 at 02:01:06PM +0100, Arnd Bergmann wrote:
> On Mon, Feb 28, 2022 at 1:36 PM Jani Nikula <jani.nikula@linux.intel.com> wrote:
> > >
> > > One minor issue that remains is an added gcc warning for shifts of
> > > negative integers when building with -Werror, which happens with the
> > > 'make W=1' option, as well as for three drivers in the kernel that always
> > > enable -Werror, but it was only observed with the i915 driver so far.
> > > To be on the safe side, add -Wno-shift-negative-value to any -Wextra
> > > in a Makefile.
> >
> > Do you mean always enable -Wall and/or -Wextra instead of -Werror?
> >
> > We do use -Werror for our CI and development too, but it's hidden behind
> > a config option that depends on COMPILE_TEST=n to avoid any problems
> > with allmodconfig/allyesconfig.
> 
> What I meant here is that I'm adding -Wno-shift-negative-value to all
> four places in the kernel that already use -Wextra.
> 
> > For the future, makes me wonder if we couldn't have a way for drivers to
> > locally enable -Wall/-Wextra in a way that incorporates the exceptions
> > from kbuild instead of having to duplicate them.
> 
> I have an older patch series that does this, but it also does a few other
> things that I couldn't quite get right in the end with all combinations of
> compiler versions and warning levels, so I did not submit that.
> 
> What this allows is to have per-directory statements like
> 
> KBUILD_WARN1=1

We've added the individual warnings to the per-directory flags so it's a
bit more flexible than just enabling W=1. The idea is to add possibly
stricter warnings once we make sure it builds fine and does not
produce false reports. Extending W=1 in the same way would affect
everybody.

  reply	other threads:[~2022-02-28 13:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 10:27 [PATCH] [v2] Kbuild: move to -std=gnu11 Arnd Bergmann
2022-02-28 10:50 ` Greg KH
2022-02-28 11:25 ` Mark Rutland
2022-02-28 11:37   ` Arnd Bergmann
2022-02-28 18:40     ` Linus Torvalds
2022-02-28 17:07   ` Masahiro Yamada
2022-02-28 11:47 ` Marco Elver
2022-02-28 11:57   ` Arnd Bergmann
2022-02-28 16:56     ` Nathan Chancellor
2022-02-28 12:36 ` Jani Nikula
2022-02-28 13:01   ` Arnd Bergmann
2022-02-28 13:19     ` David Sterba [this message]
2022-02-28 12:48 ` Alex Shi
2022-02-28 12:56 ` David Sterba
2022-02-28 17:02 ` Masahiro Yamada
2022-02-28 18:24   ` Arnd Bergmann
2022-02-28 21:03 ` Nick Desaulniers
2022-02-28 21:41   ` Fangrui Song
2022-03-01 14:45     ` Arnd Bergmann
2022-03-01 10:43 ` Miguel Ojeda
2022-03-01 14:44   ` Arnd Bergmann
2022-05-16 13:10 ` Guenter Roeck
2022-05-16 13:31   ` [greybus-dev] " Greg KH
2022-05-16 14:19     ` Guenter Roeck
2022-05-18  7:46       ` Arnd Bergmann
2022-05-18 14:07         ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228131911.GH12643@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=alexs@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=federico.vaga@vaga.pv.it \
    --cc=greybus-dev@lists.linaro.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    --cc=src.res@email.cn \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).