From: Jani Nikula <jani.nikula@intel.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: media-submaintainers@linuxtv.org, kbuild@01.org,
ksummit <ksummit-discuss@lists.linuxfoundation.org>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Ksummit-discuss] [media-submaintainers] [MAINTAINERS SUMMIT] Pull network and Patch Acceptance Consistency
Date: Thu, 20 Jun 2019 13:36:54 +0300 [thread overview]
Message-ID: <87v9x0sfuh.fsf@intel.com> (raw)
In-Reply-To: <1560959179.4729.10.camel@HansenPartnership.com>
On Wed, 19 Jun 2019, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> On Wed, 2019-06-19 at 17:48 +0300, Laurent Pinchart wrote:
>> Hi Mauro,
>>
>> On Wed, Jun 19, 2019 at 11:39:02AM -0300, Mauro Carvalho Chehab
>> wrote:
>> > Em Wed, 19 Jun 2019 10:33:23 +0200 Daniel Vetter escreveu:
>> > > On Wed, Jun 19, 2019 at 9:56 AM Dan Carpenter wrote:
>> > > > On Mon, Jun 17, 2019 at 10:31:15AM -0300, Mauro Carvalho Chehab
>> > > > wrote:
>> > > > > Also, usually, the bots don't build with W=1, as, on most
>> > > > > subsystems, this cause lots of warnings[1].
>> > > > >
>> > > > > [1] On media, we have zero warnings with W=1.
>> > > >
>> > > > We could ask the kbuild devs if they would consider making W=1
>> > > > a per tree option.
>> > >
>> > > No need to ask, just add a Kconfig which sets additional cflags
>> > > for you for your tree and your good. The usual combinatorial
>> > > testing will discover the new warnings. That's at least what we
>> > > do for i915.ko (including -Werror). Gets the job done.
>> >
>> > While this works, having a W=1 per tree would, IMHO, work better,
>> > as, as new warnings get added to W=1, we'll get those for free.
>> >
>> > -
>> >
>> > I don't like the idea of having -Werror being automatically added,
>> > as this may cause problems when people try to compile with a
>> > different compiler version - or on some weird architectures.
>>
>> It's not automatic though, if it depends on a Kconfig option that is
>> disabled by default. The built bots can enable it, while users would
>> ignore it. That being said, having it as a per-tree build bot option
>> should work as well.
>
> I really don't think well made build bots would enable this. The
> problem with -Werror is it's single threaded on the first problem.
> What a generic build bot wants to do is compile the entire tree and
> then diff the output to find the additional warnings for everything. I
> could see a tree specific build bot being more interested (until the
> build fails on an unrelated subsystem).
>
>> > Specially on drivers that build with COMPILE_TEST[1], depending on
>> > the architecture they're built, false-positive warnings rise,
>> > specially on unusual architecture with has different defines for
>> > some arch-specific typedefs (signed/unsigned, different integer
>> > type, usage or not of volatile, a different address space, etc).
>>
>> All my kernel compilation scripts use -Werror, and that does a great
>> job at catching problems. It can be a bit annoying at times when
>> someone introduces a warning, but usually a fix will already be
>> posted when I notice my build breaks. The more we use -Werror
>> globally, the faster those new warnings will be caught.
>
> I buy this for small projects, and would own up to using it in my own
> because it's a great way to force contributors not to introduce
> warnings in their patches if the build breaks. The problem with
> something huge like linux, especially when it is fairly deeply entwined
> with compiler specifics, is twofold:
>
> 1. You're going to force us to annotate all those spurious warnings
> that we've been ignoring because gcc should get fixed; incorrectly
> flagged uninitialized variables being the most annoying.
In i915 we basically start off with -Wall -Wextra, and then disable the
warnings that we want ignored. Some of the disables are on a per-file
basis. We then have -Werror behind a config knob.
It's a nice way to clean up warnings in our corner of the codebase, and
ensure it stays that way. I'm sure other drivers and subsystems would
have a slightly different set of warning disabled, and necessarily the
global config needs to be a union of those sets of warnings.
> 2. Different versions of gcc produce different warnings: so now we'll
> eventually have to target a specific gcc version and not upgrade
> until we're ready because newer versions come with shiny new
> warnings.
On the other hand this allows us to be more aware of the new warnings
and take advantage of them. But with -Werror it obviously only works in
a limited or local setting.
> That's not to say we should forbid bots and subsystems from doing this,
> that's what we're currently doing with the per-subdir enabling of
> -Werror using subdir-ccflags-y if you look, but we shouldn't globally
> mandate it.
Agreed.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2019-06-20 10:34 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 15:48 [Ksummit-discuss] " James Bottomley
2019-06-06 15:58 ` Greg KH
2019-06-06 16:24 ` James Bottomley
2019-06-13 13:59 ` Mauro Carvalho Chehab
2019-06-14 10:12 ` Laurent Pinchart
2019-06-14 13:24 ` Mauro Carvalho Chehab
2019-06-14 13:31 ` Laurent Pinchart
2019-06-14 13:54 ` Mauro Carvalho Chehab
2019-06-14 14:08 ` Laurent Pinchart
2019-06-14 14:56 ` Mark Brown
2019-06-14 13:58 ` Greg KH
2019-06-14 15:11 ` Mauro Carvalho Chehab
2019-06-14 15:23 ` James Bottomley
2019-06-14 15:43 ` Mauro Carvalho Chehab
2019-06-14 15:49 ` James Bottomley
2019-06-14 16:04 ` Mauro Carvalho Chehab
2019-06-14 16:16 ` James Bottomley
2019-06-14 17:48 ` Mauro Carvalho Chehab
2019-06-17 7:01 ` Geert Uytterhoeven
2019-06-17 13:31 ` Mauro Carvalho Chehab
2019-06-17 14:26 ` Takashi Iwai
2019-06-19 7:53 ` Dan Carpenter
2019-06-19 8:13 ` [Ksummit-discuss] [kbuild] " Philip Li
2019-06-19 8:33 ` [Ksummit-discuss] " Daniel Vetter
2019-06-19 14:39 ` Mauro Carvalho Chehab
2019-06-19 14:48 ` [Ksummit-discuss] [media-submaintainers] " Laurent Pinchart
2019-06-19 15:19 ` Mauro Carvalho Chehab
2019-06-19 15:46 ` James Bottomley
2019-06-19 16:23 ` Mark Brown
2019-06-20 12:24 ` Geert Uytterhoeven
2019-06-20 10:36 ` Jani Nikula [this message]
2019-06-19 15:56 ` Mark Brown
2019-06-19 16:09 ` Laurent Pinchart
2019-06-15 10:55 ` [Ksummit-discuss] " Daniel Vetter
2019-06-14 20:52 ` Vlastimil Babka
2019-06-15 11:01 ` Laurent Pinchart
2019-06-17 11:03 ` Mauro Carvalho Chehab
2019-06-17 12:28 ` Mark Brown
2019-06-17 16:48 ` Tim.Bird
2019-06-17 17:23 ` Geert Uytterhoeven
2019-06-17 23:13 ` Mauro Carvalho Chehab
2019-06-17 14:18 ` Laurent Pinchart
2019-06-06 16:29 ` James Bottomley
2019-06-06 18:26 ` Dan Williams
2019-06-07 20:14 ` Martin K. Petersen
2019-06-13 13:49 ` Mauro Carvalho Chehab
2019-06-13 14:35 ` James Bottomley
2019-06-13 15:03 ` Martin K. Petersen
2019-06-13 15:21 ` Bart Van Assche
2019-06-13 15:27 ` James Bottomley
2019-06-13 15:35 ` Guenter Roeck
2019-06-13 15:39 ` Bart Van Assche
2019-06-14 11:53 ` Leon Romanovsky
2019-06-14 17:06 ` Bart Van Assche
2019-06-15 7:20 ` Leon Romanovsky
2019-06-13 15:39 ` James Bottomley
2019-06-13 15:42 ` Takashi Iwai
2019-06-13 19:28 ` James Bottomley
2019-06-14 9:08 ` Dan Carpenter
2019-06-14 9:43 ` Dan Carpenter
2019-06-14 13:27 ` Dan Carpenter
2019-06-13 17:27 ` Mauro Carvalho Chehab
2019-06-13 18:41 ` James Bottomley
2019-06-13 19:11 ` Mauro Carvalho Chehab
2019-06-13 19:20 ` Joe Perches
2019-06-14 2:21 ` Mauro Carvalho Chehab
2019-06-13 19:57 ` Martin K. Petersen
2019-06-13 14:53 ` Martin K. Petersen
2019-06-13 17:09 ` Mauro Carvalho Chehab
2019-06-14 3:03 ` Martin K. Petersen
2019-06-14 3:35 ` Mauro Carvalho Chehab
2019-06-14 7:31 ` Joe Perches
2019-06-13 13:28 ` Mauro Carvalho Chehab
2019-06-06 16:18 ` Bart Van Assche
2019-06-14 19:53 ` Bjorn Helgaas
2019-06-14 23:21 ` Bjorn Helgaas
2019-06-17 10:35 ` Mauro Carvalho Chehab
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=87v9x0sfuh.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dan.carpenter@oracle.com \
--cc=kbuild@01.org \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=mchehab+samsung@kernel.org \
--cc=media-submaintainers@linuxtv.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