Thread (6 messages) flat view 6 messages, 2 authors, 2021-08-22

Re: [PATCH] vsprintf and docs: Add X to %ph for upper case output

From: Joe Perches <joe@perches.com>
Date: 2021-08-22 08:57:10
Also in: lkml

On Sun, 2021-08-22 at 11:53 +0300, Andy Shevchenko wrote:
On Sun, Aug 22, 2021 at 11:45 AM Joe Perches [off-list ref] wrote:
quoted
On Sun, 2021-08-22 at 11:31 +0300, Andy Shevchenko wrote:
quoted
On Sun, Aug 22, 2021 at 6:00 AM Joe Perches [off-list ref] wrote:
quoted
Uppercase hex output of small char arrays is moderately frequently used.
Add a mechanism to support the %*ph output as uppercase using 'X'.
Besides the fact of existing hex_asc_upper_*(), what ABI (!) uses
this? If none, I dunno we need this.
And show at least a few users where we gain something after conversion.
There are at least a few uses that could be converted.
Provide a series then!

...
quoted
+       return snprintf(buf, 16 * 2 + 2, "%16phNX\n", sn);
quoted
+       return scnprintf(buffer, PAGE_SIZE, "%16phNX\n", unique_id);
I think you need to convert to sysfs_emit() in both cases.
First things first...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help