diff --git a/arch/microblaze/include/asm/string.h b/arch/microblaze/include/asm/string.h index 34071a848b6a2..dbdb9eb4a733c 100644 --- a/arch/microblaze/include/asm/string.h +++ b/arch/microblaze/include/asm/string.h @@ -8,7 +8,9 @@ #ifdef __KERNEL__ +#ifdef CONFIG_OPT_LIB_FUNCTION #define __HAVE_ARCH_MEMSET +#endif #define __HAVE_ARCH_MEMCPY #define __HAVE_ARCH_MEMMOVE diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c index eb6c8988af027..615a2f8f53cbe 100644 --- a/arch/microblaze/lib/memset.c +++ b/arch/microblaze/lib/memset.c @@ -30,22 +30,7 @@ #include #include -#ifdef __HAVE_ARCH_MEMSET -#ifndef CONFIG_OPT_LIB_FUNCTION -void *memset(void *v_src, int c, __kernel_size_t n) -{ - char *src = v_src; - - /* Truncate c to 8 bits */ - c = (c & 0xFF); - - /* Simple, byte oriented memset or the rest of count. */ - while (n--) - *src++ = c; - - return v_src; -} -#else /* CONFIG_OPT_LIB_FUNCTION */ +#ifdef CONFIG_OPT_LIB_FUNCTION void *memset(void *v_src, int c, __kernel_size_t n) { char *src = v_src; @@ -94,6 +79,5 @@ void *memset(void *v_src, int c, __kernel_size_t n) return v_src; } -#endif /* CONFIG_OPT_LIB_FUNCTION */ EXPORT_SYMBOL(memset); -#endif /* __HAVE_ARCH_MEMSET */ +#endif /* CONFIG_OPT_LIB_FUNCTION */