X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-x86%2Fstring_32.h;h=b49369ad9a6179d0ca3e29eb1b7ddbf9670318a3;hb=69c5ddf58a03da3686691ad2f293bc79fd977c10;hp=a9b64453bdf54ecd03d239fe4d68c3b82ad92959;hpb=dcf397f037f52add9945eced57ca300ab6a4413c;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h index a9b64453bdf..b49369ad9a6 100644 --- a/include/asm-x86/string_32.h +++ b/include/asm-x86/string_32.h @@ -3,7 +3,7 @@ #ifdef __KERNEL__ -/* Let gcc decide wether to inline or use the out of line functions */ +/* Let gcc decide whether to inline or use the out of line functions */ #define __HAVE_ARCH_STRCPY extern char *strcpy(char *dest, const char *src); @@ -26,9 +26,6 @@ extern int strncmp(const char *cs, const char *ct, size_t count); #define __HAVE_ARCH_STRCHR extern char *strchr(const char *s, int c); -#define __HAVE_ARCH_STRRCHR -extern char *strrchr(const char *s, int c); - #define __HAVE_ARCH_STRLEN extern size_t strlen(const char *s); @@ -216,14 +213,14 @@ static __always_inline void * __constant_c_and_count_memset(void * s, unsigned l case 0: return s; case 1: - *(unsigned char *)s = pattern; + *(unsigned char *)s = pattern & 0xff; return s; case 2: - *(unsigned short *)s = pattern; + *(unsigned short *)s = pattern & 0xffff; return s; case 3: - *(unsigned short *)s = pattern; - *(2+(unsigned char *)s) = pattern; + *(unsigned short *)s = pattern & 0xffff; + *(2+(unsigned char *)s) = pattern & 0xff; return s; case 4: *(unsigned long *)s = pattern;