[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcO+4jD_KVDjmOYCRKy31sdC3BwgcfcEOL=RtTjvzmzHQ@mail.gmail.com>
Date: Mon, 7 Mar 2022 12:33:22 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Vincent MAILHOL <mailhol.vincent@...adoo.fr>
Cc: Rikard Falkeborn <rikard.falkeborn@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] linux/bits.h: fix -Wtype-limits warnings in GENMASK_INPUT_CHECK()
On Sun, Mar 6, 2022 at 7:35 AM Vincent MAILHOL
<mailhol.vincent@...adoo.fr> wrote:
> On Sun. 6 Mar 2022 at 06:33, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > On Sat, Mar 5, 2022 at 2:43 PM Vincent MAILHOL
> > <mailhol.vincent@...adoo.fr> wrote:
> > > On Tue. 5 Mar 2022 at 03:46, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > > > On Fri, Mar 4, 2022 at 7:36 PM Vincent Mailhol
> > > > <mailhol.vincent@...adoo.fr> wrote:
> >
> > ...
> >
> > > > NAK.
> > >
> > > Are you willing to change your decision following my comments?
> >
> > Have you read this discussion (read the thread in full)
> > https://lore.kernel.org/lkml/cover.1590017578.git.syednwaris@gmail.com/
>
> Thank you, this was an instructive read.
>
> For what I understand, there was an effort to fix this when
> -Wtype-limits was still a W=1 warning but the effort was stopped
> after -Wtype-limits was moved to W=2 despite a v4 patch being very
> close to the goal.
My understanding of that discussion is that Wtype-limits is broken,
and Linus pointed out many times that compiler warning on
if ((unsigned int)foo < 0)
is bogus. I.o.w. there is no issue with the code and hence nothing to fix.
> Back to my patch, it successfully passes the lib/test_bits.c
> build test (including the TEST_GENMASK_FAILURES) and it also
> fixes the last open warning from the thread you pointed me to (on
> drivers/crypto/inside-secure/safexcel.o):
> https://lore.kernel.org/lkml/20200709123011.GA18734@gondor.apana.org.au/
>
> So, I am still not sure to understand what issue you see with my
> patch. Is it that we should just not care about fixing W=2? Or
> do you still see some issues which are not being addressed (if
> so, sorry for not understanding)?
See above. You may Cc Linus himself to reignite the discussion.
> I do agree that fixing a W=2 has small value for all the files
> which are still emitting some W=1. However, I think it is
> beneficial to remove this W=2 spam for all the developers who
> produced W=1 clean files and would like to tackle the W=2
> warnings.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists