Skip to content
Commit 1e10cf44 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Geert Uytterhoeven
Browse files

m68k: Avoid xchg() warning



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: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201008123429.1133896-1-arnd@arndb.de


Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 3650b228
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment