mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
x86: coding style fixes to arch/x86/lib/string_32.c
Before: total: 21 errors, 0 warnings, 237 lines checked After: total: 0 errors, 0 warnings, 237 lines checked paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/string_32.o.* c55d059ef1612b32a8bb2771a72ae0d5 /tmp/string_32.o.after c55d059ef1612b32a8bb2771a72ae0d5 /tmp/string_32.o.before Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
209b580fd8
commit
3492cdf017
@ -22,7 +22,7 @@ char *strcpy(char *dest, const char *src)
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2)
|
||||
:"0" (src), "1" (dest) : "memory");
|
||||
: "0" (src), "1" (dest) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strcpy);
|
||||
@ -42,7 +42,7 @@ char *strncpy(char *dest, const char *src, size_t count)
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
|
||||
:"0" (src), "1" (dest), "2" (count) : "memory");
|
||||
: "0" (src), "1" (dest), "2" (count) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strncpy);
|
||||
@ -60,7 +60,7 @@ char *strcat(char *dest, const char *src)
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu): "memory");
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strcat);
|
||||
@ -105,9 +105,9 @@ int strcmp(const char *cs, const char *ct)
|
||||
"2:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"3:"
|
||||
:"=a" (res), "=&S" (d0), "=&D" (d1)
|
||||
:"1" (cs), "2" (ct)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0), "=&D" (d1)
|
||||
: "1" (cs), "2" (ct)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strcmp);
|
||||
@ -130,9 +130,9 @@ int strncmp(const char *cs, const char *ct, size_t count)
|
||||
"3:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"4:"
|
||||
:"=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
:"1" (cs), "2" (ct), "3" (count)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
: "1" (cs), "2" (ct), "3" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strncmp);
|
||||
@ -152,9 +152,9 @@ char *strchr(const char *s, int c)
|
||||
"movl $1,%1\n"
|
||||
"2:\tmovl %1,%0\n\t"
|
||||
"decl %0"
|
||||
:"=a" (res), "=&S" (d0)
|
||||
:"1" (s), "0" (c)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0)
|
||||
: "1" (s), "0" (c)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strchr);
|
||||
@ -169,9 +169,9 @@ size_t strlen(const char *s)
|
||||
"scasb\n\t"
|
||||
"notl %0\n\t"
|
||||
"decl %0"
|
||||
:"=c" (res), "=&D" (d0)
|
||||
:"1" (s), "a" (0), "0" (0xffffffffu)
|
||||
:"memory");
|
||||
: "=c" (res), "=&D" (d0)
|
||||
: "1" (s), "a" (0), "0" (0xffffffffu)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strlen);
|
||||
@ -189,9 +189,9 @@ void *memchr(const void *cs, int c, size_t count)
|
||||
"je 1f\n\t"
|
||||
"movl $1,%0\n"
|
||||
"1:\tdecl %0"
|
||||
:"=D" (res), "=&c" (d0)
|
||||
:"a" (c), "0" (cs), "1" (count)
|
||||
:"memory");
|
||||
: "=D" (res), "=&c" (d0)
|
||||
: "a" (c), "0" (cs), "1" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(memchr);
|
||||
@ -228,9 +228,9 @@ size_t strnlen(const char *s, size_t count)
|
||||
"cmpl $-1,%1\n\t"
|
||||
"jne 1b\n"
|
||||
"3:\tsubl %2,%0"
|
||||
:"=a" (res), "=&d" (d0)
|
||||
:"c" (s), "1" (count)
|
||||
:"memory");
|
||||
: "=a" (res), "=&d" (d0)
|
||||
: "c" (s), "1" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strnlen);
|
||||
|
Loading…
Reference in New Issue
Block a user