Skip to content

Commit

Permalink
sparc: revive __HAVE_ARCH_STRLEN for 32bit sparc
Browse files Browse the repository at this point in the history
Prior to commit 70a6fcf ("[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: 70a6fcf ("[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>
  • Loading branch information
Masahiro Yamada committed Mar 25, 2020
1 parent aefd803 commit 51e4064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions arch/sparc/include/asm/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 0 additions & 4 deletions arch/sparc/include/asm/string_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__) */

0 comments on commit 51e4064

Please sign in to comment.