microblaze: Use simple memset implementation from lib/string.c · torvalds/linux@8f0f265 (original) (raw)

`@@ -30,22 +30,7 @@

`

30

30

`#include <linux/compiler.h>

`

31

31

`#include <linux/string.h>

`

32

32

``

33

``

`-

#ifdef __HAVE_ARCH_MEMSET

`

34

``

`-

#ifndef CONFIG_OPT_LIB_FUNCTION

`

35

``

`-

void *memset(void *v_src, int c, __kernel_size_t n)

`

36

``

`-

{

`

37

``

`-

char *src = v_src;

`

38

``

-

39

``

`-

/* Truncate c to 8 bits */

`

40

``

`-

c = (c & 0xFF);

`

41

``

-

42

``

`-

/* Simple, byte oriented memset or the rest of count. */

`

43

``

`-

while (n--)

`

44

``

`-

*src++ = c;

`

45

``

-

46

``

`-

return v_src;

`

47

``

`-

}

`

48

``

`-

#else /* CONFIG_OPT_LIB_FUNCTION */

`

``

33

`+

#ifdef CONFIG_OPT_LIB_FUNCTION

`

49

34

`void *memset(void *v_src, int c, __kernel_size_t n)

`

50

35

`{

`

51

36

`char *src = v_src;

`

`@@ -94,6 +79,5 @@ void *memset(void *v_src, int c, __kernel_size_t n)

`

94

79

``

95

80

`return v_src;

`

96

81

`}

`

97

``

`-

#endif /* CONFIG_OPT_LIB_FUNCTION */

`

98

82

`EXPORT_SYMBOL(memset);

`

99

``

`-

#endif /* __HAVE_ARCH_MEMSET */

`

``

83

`+

#endif /* CONFIG_OPT_LIB_FUNCTION */

`