ia64: fix xchg() warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Jan 2021 08:52:48 +0000 (09:52 +0100)
committerArnd Bergmann <arnd@arndb.de>
Tue, 12 Jan 2021 16:02:08 +0000 (17:02 +0100)
commit968d7764e35b2fa4aad36481690b297e2c497c99
tree92930f8bccc50cf6511e780c01a35cc1295c4d33
parent796130b1de29575e2e3fc3b0da4bda162b750db7
ia64: fix xchg() warning

The definition if xchg() causes a harmless warning in some files, like:

In file included from ../arch/ia64/include/uapi/asm/intrinsics.h:22,
                 from ../arch/ia64/include/asm/intrinsics.h:11,
                 from ../arch/ia64/include/asm/bitops.h:19,
                 from ../include/linux/bitops.h:32,
                 from ../include/linux/kernel.h:11,
                 from ../fs/nfs/read.c:12:
../fs/nfs/read.c: In function 'nfs_read_completion':
../arch/ia64/include/uapi/asm/cmpxchg.h:57:2: warning: value computed is not used [-Wunused-value]
   57 | ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
      | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../fs/nfs/read.c:196:5: note: in expansion of macro 'xchg'
  196 |     xchg(&nfs_req_openctx(req)->error, error);
      |     ^~~~

Change it to a compound expression like the other architectures have
to get a clean defconfig build.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/ia64/include/uapi/asm/cmpxchg.h