Displaying 6 results from an estimated 6 matches for "6e3b560".
2016 Jun 30
6
[PATCH 0/6] lib: string: add function strtolower()
This series introduces a new generic function strtolower(), which
converts strings to lowercase in-place, overwriting the original
string. This kind of functionality is needed in several places in the
kernel. Right now, everybody seems to be implementing their own copy of
this function. So, we replace several custom "strtolower"
implementations with this new library function.
Another
2016 Jul 01
2
[PATCH 1/6] lib: string: add function strtolower()
...,__kernel_size_t);
> #endif
> void *memchr_inv(const void *s, int c, size_t n);
> char *strreplace(char *s, char old, char new);
> +char *strtolower(char *s);
>
> extern void kfree_const(const void *x);
>
> diff --git a/lib/string.c b/lib/string.c
> index ed83562..6e3b560 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new)
> return s;
> }
> EXPORT_SYMBOL(strreplace);
> +
This needs a kernel-doc comment right here.
> +char *strtolower(char *s)
> +{
> + char *p;
>...
2016 Jun 30
0
[PATCH 1/6] lib: string: add function strtolower()
...16,7 @@ extern void * memchr(const void *,int,__kernel_size_t);
#endif
void *memchr_inv(const void *s, int c, size_t n);
char *strreplace(char *s, char old, char new);
+char *strtolower(char *s);
extern void kfree_const(const void *x);
diff --git a/lib/string.c b/lib/string.c
index ed83562..6e3b560 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new)
return s;
}
EXPORT_SYMBOL(strreplace);
+
+char *strtolower(char *s)
+{
+ char *p;
+
+ if (unlikely(!s))
+ return NULL;
+
+ for (p = s; *p; p++)
+ *p = tolower(*...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
...dif
>> void *memchr_inv(const void *s, int c, size_t n);
>> char *strreplace(char *s, char old, char new);
>> +char *strtolower(char *s);
>>
>> extern void kfree_const(const void *x);
>>
>> diff --git a/lib/string.c b/lib/string.c
>> index ed83562..6e3b560 100644
>> --- a/lib/string.c
>> +++ b/lib/string.c
>> @@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new)
>> return s;
>> }
>> EXPORT_SYMBOL(strreplace);
>> +
>
> This needs a kernel-doc comment right here.
Will add it.
>&g...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
...nv(const void *s, int c, size_t n);
>>> char *strreplace(char *s, char old, char new);
>>> +char *strtolower(char *s);
>>>
>>> extern void kfree_const(const void *x);
>>>
>>> diff --git a/lib/string.c b/lib/string.c
>>> index ed83562..6e3b560 100644
>>> --- a/lib/string.c
>>> +++ b/lib/string.c
>>> @@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new)
>>> return s;
>>> }
>>> EXPORT_SYMBOL(strreplace);
>>> +
>>
>> This needs a kernel-doc comme...
2016 Jul 01
1
[PATCH 1/6] lib: string: add function strtolower()
...,__kernel_size_t);
> #endif
> void *memchr_inv(const void *s, int c, size_t n);
> char *strreplace(char *s, char old, char new);
> +char *strtolower(char *s);
>
> extern void kfree_const(const void *x);
>
> diff --git a/lib/string.c b/lib/string.c
> index ed83562..6e3b560 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new)
> return s;
> }
> EXPORT_SYMBOL(strreplace);
> +
> +char *strtolower(char *s)
> +{
> + char *p;
> +
> + if (unlikely(!s))
> +...