Skip to contentSkip to conversation

can the last traces of "bcopy" be removed?

U-Boot Robert P. J. Day 2 participants 3 messages May 22, 2016 – May 29, 2016

lore
Share & tools
lore
#0 lore raw

just noticed that this is all that's left of "bcopy":

$ grep -rw bcopy *
arch/powerpc/lib/ppcstring.S:	.globl	bcopy
arch/powerpc/lib/ppcstring.S:bcopy:
arch/microblaze/include/asm/string.h:extern void bcopy (const char *, char *, int);
include/linux/string.h:char *bcopy(const char *src, char *dest, int count);
lib/string.c: * bcopy - Copy one area of memory to another
lib/string.c: * memcpy() is the standard, bcopy() is a legacy BSD function.
lib/string.c:char * bcopy(const char * src, char * dest, int count)
$

so, really, no actual usage, and even the microblaze string.h file contains:

#if 0
#define __HAVE_ARCH_BCOPY
#define __HAVE_ARCH_MEMCPY
#define __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMMOVE

extern void *memcpy (void *, const void *, __kernel_size_t); extern void bcopy (const char *, char *, int); extern void *memset (void *, int, __kernel_size_t); extern void *memmove (void *, const void *, __kernel_size_t); #endif

so unless i'm misreading, can't bcopy() be tossed entirely while no one's using it and before anyone gets a chance to resurrect it? :-)

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

Hi,

2016-05-22 20:54 GMT+02:00 Robert P. J. Day <[email protected]>:

Quoted 23 lines

just noticed that this is all that's left of "bcopy":

$ grep -rw bcopy *
arch/powerpc/lib/ppcstring.S:   .globl  bcopy
arch/powerpc/lib/ppcstring.S:bcopy:
arch/microblaze/include/asm/string.h:extern void bcopy (const char *, char
*, int);
include/linux/string.h:char *bcopy(const char *src, char *dest, int count);
lib/string.c: * bcopy - Copy one area of memory to another
lib/string.c: * memcpy() is the standard, bcopy() is a legacy BSD function.
lib/string.c:char * bcopy(const char * src, char * dest, int count)
$

so, really, no actual usage, and even the microblaze string.h file contains:

#if 0
#define __HAVE_ARCH_BCOPY
#define __HAVE_ARCH_MEMCPY
#define __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMMOVE

Quoted 8 lines

extern void *memcpy (void *, const void *, __kernel_size_t); extern void bcopy (const char *, char *, int); extern void *memset (void *, int, __kernel_size_t); extern void *memmove (void *, const void *, __kernel_size_t); #endif

so unless i'm misreading, can't bcopy() be tossed entirely while no one's using it and before anyone gets a chance to resurrect it? :-)

No problem to remove it. Please send the patch.

Thanks,
Michal

#2 lore raw
Quoted 16 lines · Michal Simek

Hi,

2016-05-22 20:54 GMT+02:00 Robert P. J. Day <[email protected]>:

? just noticed that this is all that's left of "bcopy":

$ grep -rw bcopy *
arch/powerpc/lib/ppcstring.S:? ?.globl? bcopy arch/powerpc/lib/ppcstring.S:bcopy:
arch/microblaze/include/asm/string.h:extern void bcopy (const char *, char *, int); include/linux/string.h:char *bcopy(const char *src, char *dest, int count); lib/string.c: * bcopy - Copy one area of memory to another lib/string.c: * memcpy() is the standard, bcopy() is a legacy BSD function. lib/string.c:char * bcopy(const char * src, char * dest, int count)
$

Quoted 1 line

No problem to remove it. Please send the patch.

done, also noticed that that entire microblaze string.h file could
possibly have been tossed:

#ifndef __MICROBLAZE_STRING_H__
#define __MICROBLAZE_STRING_H__

#if 0
#define __HAVE_ARCH_BCOPY
#define __HAVE_ARCH_MEMCPY
#define __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMMOVE

extern void *memcpy (void *, const void *, __kernel_size_t); extern void bcopy (const char *, char *, int); extern void *memset (void *, int, __kernel_size_t); extern void *memmove (void *, const void *, __kernel_size_t); #endif

#endif /* __MICROBLAZE_STRING_H__ */

but i'll leave that in your capable hands, feel free to hack my
patch to do that.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================