Ksummit-Discuss Archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: mchehab+samsung@kernel.org
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation
Date: Tue, 11 Sep 2018 13:08:03 +0200	[thread overview]
Message-ID: <CAK8P3a1r0Ufr9Vsf1qZ4L1UFFCjgQjEfASsVFCCq6hrf7RsbfQ@mail.gmail.com> (raw)
In-Reply-To: <20180911063436.2f6d696e@coco.lan>

On Tue, Sep 11, 2018 at 11:35 AM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
>
> Em Tue, 11 Sep 2018 11:10:22 +0300
> Jani Nikula <jani.nikula@intel.com> escreveu:
>
> > On Mon, 10 Sep 2018, Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> > > IMHO, whatever solution, the best would be to have a makefile
> > > target equivalent to allmodconfig and allyesconfig that would
> > > add such extra maintainership logic.
> >
> > There's 'make W=n' for enabling extra gcc checks. Seems like a good fit.
>
> I wouldn't mess with W. On media, we work to have zero warnings with W=1.
> However, W=2 (and W=3) is almost unusable: lots of complains about
> signed/unsigned mix and other things that usually are ok. With gcc 8,
> the amount of warnings with W=2/W=3 at core kAPI functions makes them
> useless.
>
> People will very likely ignore or miss deprecated stuff if we
> place it as W=4.
>
> Perhaps we could add a D=1, in order to point for deprecated stuff.

I don't like the idea of adding another dimension with D=1, but I'm all for
reviewing the sets of warnings we enable at W=2/W=3  and possibly
introducing a W=4.

I've done some research on this in the past, and can probably do that
again (not sure how valuable my old data still is).
https://github.com/Barro/compiler-warnings has a list of warnings
for all compiler releases we support, and some categorizations.

I would like to add a line for each of those warnings in
include/linux/compiler-warnings.h with the compiler version that
introduced it and the warning level we want to have it enabled at,
plus some comment about why that level. We can start with the
status quo (listing the level that each warning is currently
enabled at) and then do changes based on the output of
'make W=123', which I'm sure immediately shows some that
are misclassified based on the number of warnings they produce
for randconfig and allmodconfig builds.

The definitions that I'd use for the levels would be (close to the
current definition)

W=0 (default): -Wall warnings and some -Wextra warnings that
      have zero known false positives
W=1: Most -Wextra warnings, plus everything from -Wall
      that didn't make it into W=0
W=2: clang -Wmost and the the gcc equivalent, as long as
     they are useful in the kernel context. There should be no
     warnings in common header files
W=3: clang -Weverything warnings and the gcc equivalent,
     including very noisy ones, but still only the ones that make
     sense for the kernel.

I think being able to warn for deprecated functions would fit
into W=1 or W=2 if we want to bring that back, though given that
Linus just removed __deprecated with prejudice, I wouldn't
invest any work into that part myself.

        Arnd

  reply	other threads:[~2018-09-11 11:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 22:57 [Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation Kees Cook
2018-09-05 23:41 ` Stephen Rothwell
2018-09-06  2:24   ` Steven Rostedt
2018-09-06  6:12     ` Julia Lawall
2018-09-06 18:24     ` Kees Cook
2018-09-06 23:18       ` Stephen Rothwell
2018-09-06 23:24         ` Kees Cook
2018-09-07  7:03           ` Takashi Iwai
2018-09-07  7:20             ` Johannes Berg
2018-09-07  7:31               ` Takashi Iwai
2018-09-07  9:42               ` Julia Lawall
2018-09-07  8:04             ` Jani Nikula
2018-09-07  9:38               ` Julia Lawall
2018-09-07  9:54                 ` Jani Nikula
2018-09-07 10:05                   ` Julia Lawall
2018-09-07 10:43                     ` Jani Nikula
2018-09-07 10:25                   ` Alexandre Belloni
2018-09-07 11:44                     ` Mark Brown
2018-09-10 12:51                   ` Mauro Carvalho Chehab
2018-09-11  8:10                     ` Jani Nikula
2018-09-11  9:34                       ` Mauro Carvalho Chehab
2018-09-11 11:08                         ` Arnd Bergmann [this message]
2018-09-07  8:19           ` Jan Kara
2018-09-07 14:33           ` Theodore Y. Ts'o
2018-09-07 16:10             ` Kees Cook
2018-09-07 20:30               ` Arnd Bergmann
2018-09-07 20:56                 ` Theodore Y. Ts'o
2018-09-08  8:15                   ` Geert Uytterhoeven
2018-09-08 15:19                     ` Theodore Y. Ts'o
2018-09-10 12:28           ` Mauro Carvalho Chehab
2018-09-10 16:09             ` Kees Cook
2018-09-07 10:14         ` Dan Carpenter
2018-09-07 10:40         ` Geert Uytterhoeven
2018-09-07  8:40       ` Maxime Ripard
2018-09-06  4:44 ` Julia Lawall
2018-09-06 10:04 ` Linus Walleij
2018-09-06 10:11 ` Geert Uytterhoeven
2018-09-06 14:59   ` Kees Cook
2018-09-06 15:06     ` Geert Uytterhoeven

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=CAK8P3a1r0Ufr9Vsf1qZ4L1UFFCjgQjEfASsVFCCq6hrf7RsbfQ@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=mchehab+samsung@kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).