mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 01:26:45 +07:00
dc4d7b377c
In the worst case this adds less then 128 bytes of code but on the other hand this makes code organization more clear. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: John Crispin <blogic@openwrt.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6344/
29 lines
397 B
C
29 lines
397 B
C
/*
|
|
* arch/mips/boot/compressed/string.c
|
|
*
|
|
* Very small subset of simple string routines
|
|
*/
|
|
|
|
#include <linux/types.h>
|
|
|
|
void *memcpy(void *dest, const void *src, size_t n)
|
|
{
|
|
int i;
|
|
const char *s = src;
|
|
char *d = dest;
|
|
|
|
for (i = 0; i < n; i++)
|
|
d[i] = s[i];
|
|
return dest;
|
|
}
|
|
|
|
void *memset(void *s, int c, size_t n)
|
|
{
|
|
int i;
|
|
char *ss = s;
|
|
|
|
for (i = 0; i < n; i++)
|
|
ss[i] = c;
|
|
return s;
|
|
}
|