[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdUaS=qkGT8YXTHBwW3UJDZay4tt8eOkR0r50-guts6egQ@mail.gmail.com>
Date: Mon, 12 Oct 2020 15:18:44 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Greg Ungerer <gerg@...ux-m68k.org>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] m68k: avoid xchg() warning
On Thu, Oct 8, 2020 at 2:34 PM Arnd Bergmann <arnd@...db.de> wrote:
> gcc warns about the value of xchg()/cmpxchg() being unused
> in some cases:
>
> net/core/filter.c: In function 'bpf_clear_redirect_map':
> arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value]
> 106 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
> net/core/filter.c:3595:4: note: in expansion of macro 'cmpxchg'
> 3595 | cmpxchg(&ri->map, map, NULL);
>
> Shut up that warning like we do on other architectures, by
> turning the macro into a statement expression.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
i.e. will queue in the m68k for-v5.11 branch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists