summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/bswapsi.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-09-29 09:39:57 +0200
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-09-30 16:49:49 +0200
commit0668951705d356d77c8263010c7ae59e78fdb2c6 (patch)
tree8133acd098deec243247cca32814a4cced3c7b13 /arch/mips/lib/bswapsi.c
parentmips: update config files (diff)
downloadlinux-0668951705d356d77c8263010c7ae59e78fdb2c6.tar.xz
linux-0668951705d356d77c8263010c7ae59e78fdb2c6.zip
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 <lkp@intel.com> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to '')
-rw-r--r--arch/mips/lib/bswapsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/lib/bswapsi.c b/arch/mips/lib/bswapsi.c
index 22d8e4f6d66e..02d9df489197 100644
--- a/arch/mips/lib/bswapsi.c
+++ b/arch/mips/lib/bswapsi.c
@@ -2,6 +2,9 @@
#include <linux/export.h>
#include <linux/compiler.h>
+/* To silence -Wmissing-prototypes. */
+unsigned int __bswapsi2(unsigned int u);
+
unsigned int notrace __bswapsi2(unsigned int u)
{
return (((u) & 0xff000000) >> 24) |
@@ -9,5 +12,4 @@ unsigned int notrace __bswapsi2(unsigned int u)
(((u) & 0x0000ff00) << 8) |
(((u) & 0x000000ff) << 24);
}
-
EXPORT_SYMBOL(__bswapsi2);