LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] powerpc/cell: fix build failure by disabling attribute-alias warning
@ 2018-05-29 6:58 Christophe Leroy
2018-05-30 21:42 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2018-05-29 6:58 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Arnd Bergmann
Cc: linux-kernel, linuxppc-dev
Latest GCC version emit the following warnings
As arch/powerpc code is built with -Werror, this breaks build with
GCC 8.1
This patch inhibits those warnings
CC arch/powerpc/platforms/cell/spu_syscalls.o
In file included from arch/powerpc/platforms/cell/spu_syscalls.c:26:
./include/linux/syscalls.h:233:18: error: 'sys_spu_create' alias between functions of incompatible types 'long int(const char *, unsigned int, umode_t, int)' {aka 'long int(const char *, unsigned int, short unsigned int, int)'} and 'long int(long int, long int, long int, long int)' [-Werror=attribute-alias]
asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
^~~
./include/linux/syscalls.h:222:2: note: in expansion of macro '__SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~
./include/linux/syscalls.h:214:36: note: in expansion of macro 'SYSCALL_DEFINEx'
#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~
arch/powerpc/platforms/cell/spu_syscalls.c:70:1: note: in expansion of macro 'SYSCALL_DEFINE4'
SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags,
^~~~~~~~~~~~~~~
./include/linux/syscalls.h:238:18: note: aliased declaration here
asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
^~~~~~~~
./include/linux/syscalls.h:222:2: note: in expansion of macro '__SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~
./include/linux/syscalls.h:214:36: note: in expansion of macro 'SYSCALL_DEFINEx'
#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~
arch/powerpc/platforms/cell/spu_syscalls.c:70:1: note: in expansion of macro 'SYSCALL_DEFINE4'
SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags,
^~~~~~~~~~~~~~~
./include/linux/syscalls.h:233:18: error: 'sys_spu_run' alias between functions of incompatible types 'long int(int, __u32 *, __u32 *)' {aka 'long int(int, unsigned int *, unsigned int *)'} and 'long int(long int, long int, long int)' [-Werror=attribute-alias]
asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
^~~
./include/linux/syscalls.h:222:2: note: in expansion of macro '__SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~
./include/linux/syscalls.h:213:36: note: in expansion of macro 'SYSCALL_DEFINEx'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~
arch/powerpc/platforms/cell/spu_syscalls.c:94:1: note: in expansion of macro 'SYSCALL_DEFINE3'
SYSCALL_DEFINE3(spu_run,int, fd, __u32 __user *, unpc, __u32 __user *, ustatus)
^~~~~~~~~~~~~~~
./include/linux/syscalls.h:238:18: note: aliased declaration here
asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
^~~~~~~~
./include/linux/syscalls.h:222:2: note: in expansion of macro '__SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^~~~~~~~~~~~~~~~~
./include/linux/syscalls.h:213:36: note: in expansion of macro 'SYSCALL_DEFINEx'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~
arch/powerpc/platforms/cell/spu_syscalls.c:94:1: note: in expansion of macro 'SYSCALL_DEFINE3'
SYSCALL_DEFINE3(spu_run,int, fd, __u32 __user *, unpc, __u32 __user *, ustatus)
^~~~~~~~~~~~~~~
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/cell/spu_syscalls.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c
index 263413a34823..9afc91dfbdcd 100644
--- a/arch/powerpc/platforms/cell/spu_syscalls.c
+++ b/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -67,6 +67,8 @@ static inline void spufs_calls_put(struct spufs_calls *calls) { }
#endif /* CONFIG_SPU_FS_MODULE */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattribute-alias"
SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags,
umode_t, mode, int, neighbor_fd)
{
@@ -111,6 +113,7 @@ SYSCALL_DEFINE3(spu_run,int, fd, __u32 __user *, unpc, __u32 __user *, ustatus)
spufs_calls_put(calls);
return ret;
}
+#pragma GCC diagnostic pop
#ifdef CONFIG_COREDUMP
int elf_coredump_extra_notes_size(void)
--
2.13.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/cell: fix build failure by disabling attribute-alias warning
2018-05-29 6:58 [PATCH] powerpc/cell: fix build failure by disabling attribute-alias warning Christophe Leroy
@ 2018-05-30 21:42 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2018-05-30 21:42 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Arnd Bergmann, linux-kernel, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.17-rc7 next-20180530]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-cell-fix-build-failure-by-disabling-attribute-alias-warning/20180531-003218
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
>> arch/powerpc/platforms/cell/spu_syscalls.c:71:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wattribute-alias"
^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +71 arch/powerpc/platforms/cell/spu_syscalls.c
69
70 #pragma GCC diagnostic push
> 71 #pragma GCC diagnostic ignored "-Wattribute-alias"
72 SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags,
73 umode_t, mode, int, neighbor_fd)
74 {
75 long ret;
76 struct spufs_calls *calls;
77
78 calls = spufs_calls_get();
79 if (!calls)
80 return -ENOSYS;
81
82 if (flags & SPU_CREATE_AFFINITY_SPU) {
83 struct fd neighbor = fdget(neighbor_fd);
84 ret = -EBADF;
85 if (neighbor.file) {
86 ret = calls->create_thread(name, flags, mode, neighbor.file);
87 fdput(neighbor);
88 }
89 } else
90 ret = calls->create_thread(name, flags, mode, NULL);
91
92 spufs_calls_put(calls);
93 return ret;
94 }
95
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23378 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-30 21:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 6:58 [PATCH] powerpc/cell: fix build failure by disabling attribute-alias warning Christophe Leroy
2018-05-30 21:42 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).