Skip to content

Commit 0668951

Browse files
seehearfeeltsbogend
authored andcommitted
MIPS: Silence missing prototype warning
Silence the following two warnings when make W=1: CC arch/mips/lib/bswapsi.o arch/mips/lib/bswapsi.c:5:22: warning: no previous prototype for '__bswapsi2' [-Wmissing-prototypes] unsigned int notrace __bswapsi2(unsigned int u) ^~~~~~~~~~ CC arch/mips/lib/bswapdi.o arch/mips/lib/bswapdi.c:5:28: warning: no previous prototype for '__bswapdi2' [-Wmissing-prototypes] unsigned long long notrace __bswapdi2(unsigned long long u) ^~~~~~~~~~ AR arch/mips/lib/built-in.a Reported-by: kernel test robot <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 84aff0b commit 0668951

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

arch/mips/lib/bswapdi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#include <linux/export.h>
33
#include <linux/compiler.h>
44

5+
/* To silence -Wmissing-prototypes. */
6+
unsigned long long __bswapdi2(unsigned long long u);
7+
58
unsigned long long notrace __bswapdi2(unsigned long long u)
69
{
710
return (((u) & 0xff00000000000000ull) >> 56) |
@@ -13,5 +16,4 @@ unsigned long long notrace __bswapdi2(unsigned long long u)
1316
(((u) & 0x000000000000ff00ull) << 40) |
1417
(((u) & 0x00000000000000ffull) << 56);
1518
}
16-
1719
EXPORT_SYMBOL(__bswapdi2);

arch/mips/lib/bswapsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
#include <linux/export.h>
33
#include <linux/compiler.h>
44

5+
/* To silence -Wmissing-prototypes. */
6+
unsigned int __bswapsi2(unsigned int u);
7+
58
unsigned int notrace __bswapsi2(unsigned int u)
69
{
710
return (((u) & 0xff000000) >> 24) |
811
(((u) & 0x00ff0000) >> 8) |
912
(((u) & 0x0000ff00) << 8) |
1013
(((u) & 0x000000ff) << 24);
1114
}
12-
1315
EXPORT_SYMBOL(__bswapsi2);

0 commit comments

Comments
 (0)