docs: printk-formats: Fix hex printing of signed values
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Jul 2023 14:58:38 +0000 (17:58 +0300)
committerPetr Mladek <pmladek@suse.com>
Tue, 18 Jul 2023 11:43:21 +0000 (13:43 +0200)
commit46d57a7a8e331ad402783a77d246c4196ba21863
treec5095d6ec8c06ccea9bb785af41006c51f72f60f
parent7ec85f3e089aa423a69559bf4555b6218b5a2ef7
docs: printk-formats: Fix hex printing of signed values

The commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
unnecessary %h[xudi] and %hh[xudi]") obviously missed the point of sign
promotion for the signed values lesser than int. In such case %x prints
not the same as %h[h]x. Restore back those specifiers for the signed hex
cases.

Fixes: cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20230703145839.14248-1-andriy.shevchenko@linux.intel.com
Documentation/core-api/printk-formats.rst