summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2005-01-23 23:57:20 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-23 23:57:20 -0800
commit11828b23fe6756b4e1174670102304be9e4b3bf7 (patch)
tree8a248c3198d0f6b6bded3e2b828391cb5c225d17 /lib
parent5dd0c5ab3653a48be61d6efe7c6531dbd04cc7d8 (diff)
[PATCH] removing bcopy... because it's half broken
Nothing in the kernel is using bcopy right know, and that is a good thing. Why? Because a lot of the architectures implement a broken bcopy().... the userspace standard bcopy() is basically a memmove() with a weird parameter order, however a bunch of architectures implement a memcpy() not a memmove(). Instead of fixing this inconsistency, I decided to remove it entirely, explicit memcpy() and memmove() are prefered anyway (welcome to the 1990's) and nothing in the kernel is using these functions, so this saves code size as well for everyone. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Adrian Bunk <bunk@stusta.de> [ Side note: the only reason for bcopy appears to be totally ancient gcc versions for OSF/1, used to originally cross-compile Linux on alpha. Possibly some other similar cases. Time to move on ;-] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/string.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/string.c b/lib/string.c
index 4820e317f39b..4bb93ad23c60 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -454,30 +454,6 @@ void * memset(void * s,int c,size_t count)
EXPORT_SYMBOL(memset);
#endif
-#ifndef __HAVE_ARCH_BCOPY
-/**
- * bcopy - Copy one area of memory to another
- * @srcp: Where to copy from
- * @destp: Where to copy to
- * @count: The size of the area.
- *
- * Note that this is the same as memcpy(), with the arguments reversed.
- * memcpy() is the standard, bcopy() is a legacy BSD function.
- *
- * You should not use this function to access IO space, use memcpy_toio()
- * or memcpy_fromio() instead.
- */
-void bcopy(const void * srcp, void * destp, size_t count)
-{
- const char *src = srcp;
- char *dest = destp;
-
- while (count--)
- *dest++ = *src++;
-}
-EXPORT_SYMBOL(bcopy);
-#endif
-
#ifndef __HAVE_ARCH_MEMCPY
/**
* memcpy - Copy one area of memory to another