mips: Disable attribute-alias warnings
PATCH 1/1 mips: Disable attribute-alias warnings
This warning is seen with gcc-8
error: 'sys_cachectl' alias between functions of incompatible types 'long int(char *, int, int)'
and 'long int(long int, long int, long int)'
--- arch/mips/kernel/Makefile | 2 ++ arch/mips/mm/Makefile | 1 + 2 files changed, 3 insertions(+)
arch/mips/kernel/Makefile +2 -0
@@ -2,6 +2,8 @@ # # Makefile for the Linux/MIPS kernel. # +CFLAGS_signal.o += $(call cc-disable-warning, attribute-alias) +CFLAGS_syscall.o += $(call cc-disable-warning, attribute-alias) extra-y := head.o vmlinux.lds
arch/mips/mm/Makefile +1 -0
@@ -2,6 +2,7 @@ # # Makefile for the Linux/MIPS-specific parts of the memory manager. # +CFLAGS_cache.o += $(call cc-disable-warning, attribute-alias) obj-y += cache.o dma-default.o extable.o fault.o \ gup.o init.o mmap.o page.o page-funcs.o \
Signature · 1 line
2.17.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 41 lines · Khem Raj
Quoted 28 lines · Matt Redfearn
Hi Khem,
Quoted 24 lines · Khem Raj
This warning is seen with gcc-8
error: '
sys_cachectl' alias between functions of incompatible types 'longint(char *, int, int)'
and 'longint(long int, long int, long int)'--- arch/mips/kernel/Makefile | 2 ++ arch/mips/mm/Makefile | 1 + 2 files changed, 3 insertions(+)arch/mips/kernel/Makefile +1
-0@@ -2,6 +2,8 @@ # # Makefile for the Linux/MIPS kernel. # +CFLAGS_signal.o += $(call cc-disable-warning, attribute-alias)Quoted 9 lines
arch/mips/kernel/Makefile line 6
Quoted 1 line
arch/mips/kernel/Makefile +1
-0+CFLAGS_syscall.o += $(call cc-disable-warning, attribute-alias)Rather than disabling the (potentially useful) warning for the whole compilation unit, the better fix, I believe, would be something like Arnd proposed https://patchwork.kernel.org/patch/10093317/ to disable it just for the definition of the syscall entry point . Whatever happened to that RFC Arnd?
Quoted 3 lines
I tend to agree. I think, I have also tested a patch where I am manually ignoring the warning via pragma around the function which essentially is similar to what Arnd has proposed only that Arnd's patch is generic
Sorry I never followed up on my initial patches. I still think we should do it that way, but will need some more time until I can revisit them, as I'm currently
travelling. If someone else wants to pick up my patches and post a new version in the meantime, that would be greatly appreciated.
Arnd
Hi Arnd,
Quoted 8 lines · Arnd Bergmann
Quoted 3 lines
I tend to agree. I think, I have also tested a patch where I am manually ignoring the warning via pragma around the function which essentially is similar to what Arnd has proposed only that Arnd's patch is generic
Sorry I never followed up on my initial patches. I still think we should do it that way, but will need some more time until I can revisit them, as I'm currently travelling. If someone else wants to pick up my patches and post a new version in the meantime, that would be greatly appreciated.
If you're still away then I'll aim to do this tomorrow - I see PowerPC has already merged local #pragma's & we've had 2 submissions now for the MIPS equivalent, so it'd be good to get this solved generically.
Thanks,
Paul