[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190729205746.GI250418@google.com>
Date: Mon, 29 Jul 2019 13:57:46 -0700
From: Matthias Kaehlcke <mka@...omium.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
"David S. Miller" <davem@...emloft.net>,
Sasha Levin <sashal@...nel.org>,
Toralf Förster <toralf.foerster@....de>,
Nathan Huckleberry <nhuck@...gle.com>
Subject: Re: [PATCH 5.2 083/215] net/ipv4: fib_trie: Avoid cryptic ternary
expressions
On Mon, Jul 29, 2019 at 01:54:22PM -0700, Matthias Kaehlcke wrote:
> Hi Greg,
>
> Toralf just pointed out in another thread that the commit message and
> the content of this patch don't match (https://lkml.org/lkml/2019/7/29/1475)
>
> I did some minor digging, the content of the queued patch is:
>
> commit 4df607cc6fe8e46b258ff2a53d0a60ca3008ffc7
> Author: Nathan Huckleberry <nhuck@...gle.com>
> Date: Mon Jun 17 10:28:29 2019 -0700
>
> kbuild: Remove unnecessary -Wno-unused-value
>
>
> however the commit message is from:
>
> commit 25cec756891e8733433efea63b2254ddc93aa5cc
> Author: Matthias Kaehlcke <mka@...omium.org>
> Date: Tue Jun 18 14:14:40 2019 -0700
>
> net/ipv4: fib_trie: Avoid cryptic ternary expressions
>
>
> It seems this hasn't been commited to -stable yet, so we are probably
> in time to remove it from the queue before it becomes git history and
> have Nathan re-spin the patch(es).
s/Nathan/Sasha/
For some reason I thought Nathan backported this and wondered that his
SOB is missing. The correct SOB is actually there.
> On Mon, Jul 29, 2019 at 09:21:19PM +0200, Greg Kroah-Hartman wrote:
> > [ Upstream commit 25cec756891e8733433efea63b2254ddc93aa5cc ]
> >
> > empty_child_inc/dec() use the ternary operator for conditional
> > operations. The conditions involve the post/pre in/decrement
> > operator and the operation is only performed when the condition
> > is *not* true. This is hard to parse for humans, use a regular
> > 'if' construct instead and perform the in/decrement separately.
> >
> > This also fixes two warnings that are emitted about the value
> > of the ternary expression being unused, when building the kernel
> > with clang + "kbuild: Remove unnecessary -Wno-unused-value"
> > (https://lore.kernel.org/patchwork/patch/1089869/):
> >
> > CC net/ipv4/fib_trie.o
> > net/ipv4/fib_trie.c:351:2: error: expression result unused [-Werror,-Wunused-value]
> > ++tn_info(n)->empty_children ? : ++tn_info(n)->full_children;
> >
> > Fixes: 95f60ea3e99a ("fib_trie: Add collapse() and should_collapse() to resize")
> > Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> > Reviewed-by: Douglas Anderson <dianders@...omium.org>
> > Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> > Acked-by: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
> > Signed-off-by: David S. Miller <davem@...emloft.net>
> > Signed-off-by: Sasha Levin <sashal@...nel.org>
> > ---
> > scripts/Makefile.extrawarn | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> > index 3ab8d1a303cd..b293246e48fe 100644
> > --- a/scripts/Makefile.extrawarn
> > +++ b/scripts/Makefile.extrawarn
> > @@ -68,7 +68,6 @@ else
> >
> > ifdef CONFIG_CC_IS_CLANG
> > KBUILD_CFLAGS += -Wno-initializer-overrides
> > -KBUILD_CFLAGS += -Wno-unused-value
> > KBUILD_CFLAGS += -Wno-format
> > KBUILD_CFLAGS += -Wno-sign-compare
> > KBUILD_CFLAGS += -Wno-format-zero-length
Powered by blists - more mailing lists