Skip to content

Commit 4155203

Browse files
chleroympe
authored andcommitted
powerpc: fix build failure by disabling attribute-alias warning in pci_32
Commit 2479bfc ("powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx") forgot arch/powerpc/kernel/pci_32.c 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 this warning In file included from arch/powerpc/kernel/pci_32.c:14: ./include/linux/syscalls.h:233:18: error: 'sys_pciconfig_iobase' alias between functions of incompatible types 'long int(long int, long unsigned int, long 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__) ^~~~~~~~~~~~~~~~~ Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 2e5c93d commit 4155203

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/powerpc/kernel/pci_32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ pci_bus_to_hose(int bus)
285285
* Note that the returned IO or memory base is a physical address
286286
*/
287287

288+
#pragma GCC diagnostic push
289+
#pragma GCC diagnostic ignored "-Wpragmas"
290+
#pragma GCC diagnostic ignored "-Wattribute-alias"
288291
SYSCALL_DEFINE3(pciconfig_iobase, long, which,
289292
unsigned long, bus, unsigned long, devfn)
290293
{
@@ -310,3 +313,4 @@ SYSCALL_DEFINE3(pciconfig_iobase, long, which,
310313

311314
return result;
312315
}
316+
#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)