[v1,2/2] docs: printk-formats: Treat char as always unsigned

Message ID 20230703145839.14248-2-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v1,1/2] docs: printk-formats: Fix hex printing of signed values |

Commit Message

Andy Shevchenko July 3, 2023, 2:58 p.m. UTC
  The Linux kernel switched to have char be equivalent to usigned char.
Reflect this in the printk specifiers.

Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/core-api/printk-formats.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Petr Mladek July 14, 2023, 3:34 p.m. UTC | #1
On Mon 2023-07-03 17:58:39, Andy Shevchenko wrote:
> The Linux kernel switched to have char be equivalent to usigned char.
> Reflect this in the printk specifiers.
> 
> Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Makes sense.

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

PS: I am going to queue both patches for 6.6. They are not
    urgent to be added in the -rc phase.
  
Andy Shevchenko July 14, 2023, 4:04 p.m. UTC | #2
On Fri, Jul 14, 2023 at 05:34:35PM +0200, Petr Mladek wrote:
> On Mon 2023-07-03 17:58:39, Andy Shevchenko wrote:

...

> Reviewed-by: Petr Mladek <pmladek@suse.com>

Thank you for the review!

> PS: I am going to queue both patches for 6.6. They are not
>     urgent to be added in the -rc phase.

Sure, works for me.
  
Petr Mladek July 18, 2023, 11:46 a.m. UTC | #3
On Fri 2023-07-14 19:04:43, Andy Shevchenko wrote:
> On Fri, Jul 14, 2023 at 05:34:35PM +0200, Petr Mladek wrote:
> > On Mon 2023-07-03 17:58:39, Andy Shevchenko wrote:
> 
> > PS: I am going to queue both patches for 6.6. They are not
> >     urgent to be added in the -rc phase.
> 
> Sure, works for me.

JFYI, both patches have been pushed into printk/linux.git,
branch for-6.6-vsprintf-doc.

Best Regards,
Petr
  

Patch

diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index 2f3a6e0b3fc4..4451ef501936 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -15,8 +15,9 @@  Integer types
 
 	If variable is of Type,		use printk format specifier:
 	------------------------------------------------------------
-		char			%d or %hhx
+		signed char		%d or %hhx
 		unsigned char		%u or %x
+		char			%u or %x
 		short int		%d or %hx
 		unsigned short int	%u or %x
 		int			%d or %x