On Thu, Oct 8, 2020 at 2:34 PM Arnd Bergmann <[email protected]> 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 <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]> 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 -- [email protected] 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

