sparc: revive __HAVE_ARCH_STRLEN for 32bit sparc
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 11 Mar 2020 22:37:24 +0000 (07:37 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 25 Mar 2020 01:19:43 +0000 (10:19 +0900)
Prior to commit 70a6fcf3283a ("[sparc] unify 32bit and 64bit string.h"),
__HAVE_ARCH_STRLEN was defined in both of string_32.h and string_64.h

It did not unify __HAVE_ARCH_STRLEN, but deleted it from string_32.h

This issue was reported by the kbuild test robot in the trial of
forcible linking of $(lib-y) to vmlinux.

Fixes: 70a6fcf3283a ("[sparc] unify 32bit and 64bit string.h")
Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/string.h
arch/sparc/include/asm/string_64.h

index 3d9cd082716bfd15db13f28cd74f035c76248392..001a17baf2d5865986699a3ecfd8fa322fed6c54 100644 (file)
@@ -37,6 +37,10 @@ void *memmove(void *, const void *, __kernel_size_t);
 #define __HAVE_ARCH_MEMCMP
 int memcmp(const void *,const void *,__kernel_size_t);
 
+/* Now the str*() stuff... */
+#define __HAVE_ARCH_STRLEN
+__kernel_size_t strlen(const char *);
+
 #define __HAVE_ARCH_STRNCMP
 int strncmp(const char *, const char *, __kernel_size_t);
 
index ee9ba67321bd8735d78008cdd6449c4c2405258b..d5c563058a5be3205d8c2928c4a5f342c49a1573 100644 (file)
@@ -12,8 +12,4 @@
 
 #include <asm/asi.h>
 
-/* Now the str*() stuff... */
-#define __HAVE_ARCH_STRLEN
-__kernel_size_t strlen(const char *);
-
 #endif /* !(__SPARC64_STRING_H__) */