Skip to content

Commit

Permalink
[PATCH] No arch-specific strpbrk implementations
Browse files Browse the repository at this point in the history
While cleaning up parisc_ksyms.c earlier, I noticed that strpbrk wasn't
being exported from lib/string.c.  Investigating further, I noticed a
changeset that removed its export and added it to _ksyms.c on a few more
architectures.  The justification was that "other arches do it."

I think this is wrong, since no architecture currently defines
__HAVE_ARCH_STRPBRK, there's no reason for any of them to be exporting it
themselves.  Therefore, consolidate the export to lib/string.c.

Signed-off-by: Kyle McMartin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Kyle McMartin authored and Linus Torvalds committed Apr 11, 2006
1 parent c80d79d commit 894b577
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 20 deletions.
1 change: 0 additions & 1 deletion arch/alpha/kernel/alpha_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(memcmp);
Expand Down
1 change: 0 additions & 1 deletion arch/arm/kernel/armksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ EXPORT_SYMBOL(__raw_writesl);

/* string / mem functions */
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memcpy);
Expand Down
1 change: 0 additions & 1 deletion arch/arm26/kernel/armksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(memset);
Expand Down
1 change: 0 additions & 1 deletion arch/cris/kernel/crisksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ EXPORT_SYMBOL(loops_per_usec);
/* String functions */
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strchr);
Expand Down
1 change: 0 additions & 1 deletion arch/frv/kernel/frv_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);

EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strchr);
Expand Down
1 change: 0 additions & 1 deletion arch/h8300/kernel/h8300_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extern char h8300_debug_device[];
/* platform dependent support */

EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strchr);
Expand Down
1 change: 0 additions & 1 deletion arch/i386/kernel/i386_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ EXPORT_SYMBOL(__put_user_2);
EXPORT_SYMBOL(__put_user_4);
EXPORT_SYMBOL(__put_user_8);

EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);

#ifdef CONFIG_SMP
Expand Down
2 changes: 0 additions & 2 deletions arch/m32r/kernel/m32r_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__const_udelay);

EXPORT_SYMBOL(strpbrk);

EXPORT_SYMBOL(strncpy_from_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(clear_user);
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/kernel/m68k_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(kernel_thread);
Expand Down
1 change: 0 additions & 1 deletion arch/m68knommu/kernel/m68k_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strchr);
Expand Down
1 change: 0 additions & 1 deletion arch/mips/kernel/mips_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strncmp);
#endif
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strrchr);
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/parisc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include <linux/string.h>
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(strpbrk);

#include <asm/atomic.h>
EXPORT_SYMBOL(__xchg8);
Expand Down
1 change: 0 additions & 1 deletion arch/sh/kernel/sh_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(no_irq_type);

EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strnlen);
Expand Down
1 change: 0 additions & 1 deletion arch/sh64/kernel/sh_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ EXPORT_SYMBOL(kernel_thread);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy);

EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);

#ifdef CONFIG_VT
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/sparc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(page_kernel);

Expand Down
1 change: 0 additions & 1 deletion arch/sparc64/kernel/sparc64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ EXPORT_SYMBOL(__prom_getsibling);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(__strlen_user);
EXPORT_SYMBOL(__strnlen_user);
EXPORT_SYMBOL(strpbrk);

#ifdef CONFIG_SOLARIS_EMUL_MODULE
EXPORT_SYMBOL(linux_sparc_syscall);
Expand Down
1 change: 0 additions & 1 deletion arch/v850/kernel/v850_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ EXPORT_SYMBOL (strncmp);
EXPORT_SYMBOL (strchr);
EXPORT_SYMBOL (strlen);
EXPORT_SYMBOL (strnlen);
EXPORT_SYMBOL (strpbrk);
EXPORT_SYMBOL (strrchr);
EXPORT_SYMBOL (strstr);
EXPORT_SYMBOL (memset);
Expand Down
1 change: 0 additions & 1 deletion arch/x86_64/kernel/x8664_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ extern void * memcpy(void *,const void *,__kernel_size_t);
extern void * __memcpy(void *,const void *,__kernel_size_t);

EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(__memcpy);
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/kernel/xtensa_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strrchr);
Expand Down
1 change: 1 addition & 0 deletions lib/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ char *strpbrk(const char *cs, const char *ct)
}
return NULL;
}
EXPORT_SYMBOL(strpbrk);
#endif

#ifndef __HAVE_ARCH_STRSEP
Expand Down

0 comments on commit 894b577

Please sign in to comment.