Skip to contentSkip to conversation

ia64: fix xchg() warning

PATCH In review Arnd Bergmann 3 participants 7 messages Jan 4, 2021 – Jan 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: fix xchg() warning

From: Arnd Bergmann <[email protected]>

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.

---
 arch/ia64/include/uapi/asm/cmpxchg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/uapi/asm/cmpxchg.h +1 -1
index d69c979936d4..5d90307fd6e0 100644
@@ -54,7 +54,7 @@ extern void ia64_xchg_called_with_bad_pointer(void);
 })
 
 #define xchg(ptr, x)							\
-((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
+({(__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)));})
 
 /*
  * Atomic compare and exchange.  Compare OLD with MEM, if identical,
Signature · 1 line
2.29.2
#1 lore raw

Hi Arnd!

Quoted 2 lines · Arnd Bergmann

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

Slightly OT: Has your other fix for the timer regression on ia64 already been merged? I can test this patch later today.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#2 lore raw
Quoted 9 lines · John Paul Adrian Glaubitz

Hi Arnd!

Quoted 2 lines · Arnd Bergmann

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

Slightly OT: Has your other fix for the timer regression on ia64 already been merged? I can test this patch later today.

I have not received any reply from the ia64 maintainers, I assume they were both out of office for Christmas.

Arnd

#3 lore raw

PiBJIGhhdmUgbm90IHJlY2VpdmVkIGFueSByZXBseSBmcm9tIHRoZSBpYTY0IG1haW50YWluZXJz LCBJIGFzc3VtZSB0aGV5IHdlcmUNCj4gYm90aCBvdXQgb2Ygb2ZmaWNlIGZvciBDaHJpc3RtYXMu DQoNCkknbSBiYWNrIGluIHRoZSBvZmZpY2UgLi4uIGJ1dCBoYXZlIG5vIHdvcmtpbmcgaWE2NCBt YWNoaW5lcywgbm9yIHRpbWUgdG8gbG9vayBhdCBwYXRjaGVzIDotKA0KDQpTaG91bGQgZHJvcCBt ZSBmcm9tIHRoZSBNQUlOVEFJTlRFUlMgZmlsZS4NCg0KLVRvbnkNCg=

#4 lore raw
Quoted 7 lines · Tony
Quoted 3 lines

I have not received any reply from the ia64 maintainers, I assume they were both out of office for Christmas.

I'm back in the office ... but have no working ia64 machines, nor time to look at patches :-(

Should drop me from the MAINTAINTERS file.

If you like, I can apply the patch below and take that through my asm-generic tree along with the two bug fixes I sent:

MAINTAINERS +1 -4
index 0f2e55faaf7f..b74093803154 100644
@@ -8432,11 +8432,8 @@ F: drivers/i3c/
 F: include/linux/i3c/
 
 IA64 (Itanium) PLATFORM
-M: Tony Luck <[email protected]>
-M: Fenghua Yu <[email protected]>
 L: [email protected]
-S: Odd Fixes
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
+S: Orphan
 F: Documentation/ia64/
 F: arch/ia64/
 

Is that what you had in mind? I see that Fenghua Yu has not been actively involved for a long time. If you are both out, that would make the port unmaintained, but that may actually help find someone else to either volunteer as a maintainer or pay someone if they have a commercial interest.

Arnd

Acked-by
#5 lore raw
Quoted 29 lines · Arnd Bergmann
Quoted 7 lines · Tony
Quoted 3 lines

I have not received any reply from the ia64 maintainers, I assume they were both out of office for Christmas.

I'm back in the office ... but have no working ia64 machines, nor time to look at patches :-(

Should drop me from the MAINTAINTERS file.

If you like, I can apply the patch below and take that through my asm-generic tree along with the two bug fixes I sent:

MAINTAINERS +1 -4
index 0f2e55faaf7f..b74093803154 100644
@@ -8432,11 +8432,8 @@ F: drivers/i3c/
 F: include/linux/i3c/
 
 IA64 (Itanium) PLATFORM
-M: Tony Luck <[email protected]>
-M: Fenghua Yu <[email protected]>
 L: [email protected]
-S: Odd Fixes
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
+S: Orphan
 F: Documentation/ia64/
 F: arch/ia64/
 
Quoted 5 lines

Is that what you had in mind? I see that Fenghua Yu has not been actively involved for a long time. If you are both out, that would make the port unmaintained, but that may actually help find someone else to either volunteer as a maintainer or pay someone if they have a commercial interest.

Yes. Fenghua has moved to working on other things, so that looks good.

-Tony

#6 lore raw

Hi!

Quoted 25 lines · Tony
Quoted 17 lines
MAINTAINERS +1 -4
index 0f2e55faaf7f..b74093803154 100644
@@ -8432,11 +8432,8 @@ F: drivers/i3c/
 F: include/linux/i3c/
 
 IA64 (Itanium) PLATFORM
-M: Tony Luck <[email protected]>
-M: Fenghua Yu <[email protected]>
 L: [email protected]
-S: Odd Fixes
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
+S: Orphan
 F: Documentation/ia64/
 F: arch/ia64/
 
Quoted 5 lines

Is that what you had in mind? I see that Fenghua Yu has not been actively involved for a long time. If you are both out, that would make the port unmaintained, but that may actually help find someone else to either volunteer as a maintainer or pay someone if they have a commercial interest.

Yes. Fenghua has moved to working on other things, so that looks good.

Quoted 1 line

I wonder whether I can take over maintainership. I'm certainly not experienced as Tony or Fenghua, but I guess one can grow with the task, can't one?

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913