]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: Silence missing prototype warning
authorTiezhu Yang <yangtiezhu@loongson.cn>
Thu, 29 Sep 2022 07:39:57 +0000 (15:39 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 30 Sep 2022 14:49:49 +0000 (16:49 +0200)
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>
arch/mips/lib/bswapdi.c
arch/mips/lib/bswapsi.c

index fcef74084492c97a4e874d471ca954e68dd1f6ec..1d020e1c96a0856299e19bdd19eb4e7403862d6f 100644 (file)
@@ -2,6 +2,9 @@
 #include <linux/export.h>
 #include <linux/compiler.h>
 
+/* To silence -Wmissing-prototypes. */
+unsigned long long __bswapdi2(unsigned long long u);
+
 unsigned long long notrace __bswapdi2(unsigned long long u)
 {
        return (((u) & 0xff00000000000000ull) >> 56) |
@@ -13,5 +16,4 @@ unsigned long long notrace __bswapdi2(unsigned long long u)
               (((u) & 0x000000000000ff00ull) << 40) |
               (((u) & 0x00000000000000ffull) << 56);
 }
-
 EXPORT_SYMBOL(__bswapdi2);
index 22d8e4f6d66ec5c178a48c189a4e75bbb98abd47..02d9df48919758a4e3692486b3ec54fc38b00764 100644 (file)
@@ -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);