hv: lib: remove memchr

No one uses it and it's some duplicated with strchr.

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Li, Fei1
2018-12-17 23:32:57 +08:00
committed by wenlingz
parent 97132acccf
commit 5b467269be
2 changed files with 0 additions and 16 deletions

View File

@@ -21,7 +21,6 @@ union u_qword {
/* Function prototypes */ /* Function prototypes */
void udelay(uint32_t us); void udelay(uint32_t us);
void *memchr(const void *void_s, int32_t c, size_t n);
int32_t strcmp(const char *s1_arg, const char *s2_arg); int32_t strcmp(const char *s1_arg, const char *s2_arg);
int32_t strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg); int32_t strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg);
char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg); char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg);

View File

@@ -259,21 +259,6 @@ void free(const void *ptr)
} }
} }
void *memchr(const void *void_s, int32_t c, size_t n)
{
uint8_t val = (uint8_t)c;
uint8_t *ptr = (uint8_t *)void_s;
uint8_t *end = ptr + n;
while (ptr < end) {
if (*ptr == val) {
return ((void *)ptr);
}
ptr++;
}
return NULL;
}
static inline void memcpy_erms(void *d, const void *s, size_t slen) static inline void memcpy_erms(void *d, const void *s, size_t slen)
{ {
asm volatile ("rep; movsb" asm volatile ("rep; movsb"