Call strcpytoupper() rather than copying the string explicitly and then
walking it to convert it to uppercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
Call strlcpytolower() rather than copying the string explicitly and
then walking it to convert it to lowercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
take a single string argument and modify the passed-in string.
strlcpytoupper() and strlcpytolower() return the number of characters
copied or -E2BIG if the destination string was truncated.
Like strlcpy(), and unlike strncpy(), the functions guarantee NULL
termination of the destination string.
S
independent and
can't rely on a Linux library function (see [3])
- Added two new patches replacing strtoupper() implementations
[1] https://lkml.org/lkml/2016/6/30/727
[2] https://lkml.org/lkml/2016/7/10/4
[3] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add funct
Call strcpytoupper() rather than copying the string explicitly and then
walking it to convert it to uppercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
Call strlcpytolower() rather than copying the string explicitly and
then walking it to convert it to lowercase.
Signed-off-by: Markus Mayer
---
The semantics of the new function has changed, so this patch has been
updated since v2 to match the new strlcpy() semantics (no explicit NULL
take a single string argument and modify the passed-in string.
strlcpytoupper() and strlcpytolower() return the number of characters
copied or -E2BIG if the destination string was truncated.
Like strlcpy(), and unlike strncpy(), the functions guarantee NULL
termination of the destination string.
S
[3] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add functions to case-convert strings
drm/nouveau/core: make use of new strlcpytolower() function
ACPI / device_sysfs: make use of new strtolower() function
staging: speakup: replace spk_strlwr() with strlcpytolower()
i
On Wed, Jul 13, 2016 at 03:52:38PM -0700, Markus Mayer wrote:
> On Sat, Jul 09, 2016 at 09:11:05PM -0700, Markus Mayer wrote:
>> On 9 July 2016 at 20:13, Chris Metcalf wrote:
>>> On 7/8/2016 6:43 PM, Markus Mayer wrote:
>>>>
>>>> This series introduces
On 9 July 2016 at 08:30, Markus Mayer wrote:
> On 9 July 2016 at 05:04, Luis de Bethencourt
> wrote:
>> On 08/07/16 23:43, Markus Mayer wrote:
>>> Add a collection of generic functions to convert strings to lowercase
>>> or uppercase.
>>>
>>>
On 9 July 2016 at 20:13, Chris Metcalf wrote:
> On 7/8/2016 6:43 PM, Markus Mayer wrote:
>>
>> This series introduces a family of generic string case conversion
>> functions. This kind of functionality is needed in several places in
>> the kernel. Right now, everybo
On 9 July 2016 at 05:04, Luis de Bethencourt wrote:
> On 08/07/16 23:43, Markus Mayer wrote:
>> Add a collection of generic functions to convert strings to lowercase
>> or uppercase.
>>
>> Changing the case of a string (with or without copying it first) seems
>>
Call strcpytoupper() rather than copying the string explicitly and then
walking it to convert it to uppercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
Call strlcpytolower() rather than copying the string explicitly and
then walking it to convert it to lowercase.
Signed-off-by: Markus Mayer
---
The semantics of the new function has changed, so this patch has been
updated since v2 to match the new strlcpy() semantics (no explicit NULL
ctions take a single string argument and modify the passed-in string.
Like strlcpy(), and unlike strncpy(), the functions guarantee NULL
termination of the destination string.
Signed-off-by: Markus Mayer
---
include/linux/string.h | 40
lib/str
l.org/lkml/2016/6/30/727
[2] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add functions to case-convert strings
drm/nouveau/core: make use of new strlcpytolower() function
ACPI / device_sysfs: make use of new strtolower() function
staging: speakup: replace spk_strlwr()
On 7 July 2016 at 17:19, Rasmus Villemoes wrote:
> On Tue, Jul 05 2016, Markus Mayer wrote:
>
>> +/**
>> + * strncpytoupper - Copy a length-limited string and convert to uppercase.
>> + * @dst: The buffer to store the result.
>> + * @src: The string to convert to u
On 5 July 2016 at 15:56, Joe Perches wrote:
> On Tue, 2016-07-05 at 15:36 -0700, Markus Mayer wrote:
>> On 5 July 2016 at 15:14, Joe Perches wrote:
>> > On Tue, 2016-07-05 at 13:47 -0700, Markus Mayer wrote:
>> > > This series introduces a family of
On 5 July 2016 at 15:14, Joe Perches wrote:
> On Tue, 2016-07-05 at 13:47 -0700, Markus Mayer wrote:
>> This series introduces a family of generic string case conversion
>> functions. This kind of functionality is needed in several places in
>> the kernel. Right now,
Call strcpytoupper() rather than copying the string explicitly and then
walking it to convert it to uppercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
Call strncpytolower() rather than copying the string explicitly and
then walking it to convert it to lowercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
ctions take a single string argument and modify the passed-in
string.
All functions return a pointer to the terminating '\0' character in the
modified string ("dst" or "s", respectively).
Signed-off-by: Markus Mayer
---
include/linux/string.h | 48
tion (see [2])
- Added two new patches replacing strtoupper() implementations
[1] https://lkml.org/lkml/2016/6/30/727
[2] https://lkml.org/lkml/2016/7/1/9
Markus Mayer (7):
lib: string: add functions str[n]cpytolower()/str[n]cpytoupper()
drm/nouveau/core: make use of new strncpytolower() functio
On 1 July 2016 at 14:08, Rasmus Villemoes wrote:
> A few suggestions:
>
> - Make the function take separate src and dst parameters, making it explicitly
> allowed to pass the same value (but not other kinds of overlap, of
> course). That way one can avoid "strcpy(dst, src); strtolower(dst);".
On 1 July 2016 at 18:18, Alexandre Courbot wrote:
> On Fri, Jul 1, 2016 at 8:50 AM, Markus Mayer wrote:
>> Call strtolower() rather than walking the string explicitly to convert
>> it to lowercase.
>>
>> Signed-off-by: Markus Mayer
>> ---
>> drivers/g
On 1 July 2016 at 03:52, Jani Nikula wrote:
> On Fri, 01 Jul 2016, Markus Mayer wrote:
>> Add a function called strtolower() to convert strings to lower case
>> in-place, overwriting the original string.
>>
>> This seems to be a recurring requirement in the kernel
Call strtolower() rather than walking the string explicitly to convert
it to lowercase.
Signed-off-by: Markus Mayer
---
drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
b/drivers
Add a function called strtolower() to convert strings to lower case
in-place, overwriting the original string.
This seems to be a recurring requirement in the kernel that is
currently being solved by several duplicated implementations doing the
same thing.
Signed-off-by: Markus Mayer
f required hardware.
This series is based on v4.7-rc5.
Markus Mayer (6):
lib: string: add function strtolower()
drm/nouveau/core: make use of new strtolower() function
ACPICA: make use of new strtolower() function
ACPI / device_sysfs: make use of new strtolower() function
staging: speaku
29 matches
Mail list logo