linux/Documentation/core-api
Joe Perches cbacb5ab0a docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]
Standard integer promotion is already done and %hx and %hhx is useless
so do not encourage the use of %hh[xudi] or %h[xudi].

As Linus said in:
https://lore.kernel.org/lkml/CAHk-=wgoxnmsj8GEVFJSvTwdnWm8wVJthefNk2n6+4TC=20e0Q@mail.gmail.com/

It's a pointless warning, making for more complex code, and
making people remember esoteric printf format details that have no
reason for existing.

The "h" and "hh" things should never be used. The only reason for them
being used if if you have an "int", but you want to print it out as a
"char" (and honestly, that is a really bad reason, you'd be better off
just using a proper cast to make the code more obvious).

So if what you have a "char" (or unsigned char) you should always just
print it out as an "int", knowing that the compiler already did the
proper type conversion.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Louis Taylor <louis@kragniz.eu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-09-14 01:57:43 -06:00
..
assoc_array.rst
atomic_ops.rst
boot-time-mm.rst
cachetlb.rst ia64/tlb: Eradicate tlb_migrate_finish() callback 2019-04-03 10:33:04 +02:00
circular-buffers.rst doc: Remove ".vnet" from paulmck email addresses 2019-05-28 09:02:57 -07:00
cpu_hotplug.rst
debug-objects.rst
errseq.rst
gcc-plugins.rst docs: move gcc_plugins.txt to core-api and rename to .rst 2019-07-15 09:20:27 -03:00
genalloc.rst
generic-radix-tree.rst
genericirq.rst
gfp_mask-from-fs-io.rst
idr.rst
index.rst docs: index.rst: don't use genindex for pdf output 2019-07-31 13:31:16 -06:00
kernel-api.rst asm-generic, x86: add bitops instrumentation for KASAN 2019-07-12 11:05:42 -07:00
librs.rst
local_ops.rst
memory-allocation.rst
memory-hotplug.rst
mm-api.rst
packing.rst docs: packing: move it to core-api book and adjust markups 2019-07-31 13:30:01 -06:00
printk-formats.rst docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi] 2019-09-14 01:57:43 -06:00
protection-keys.rst docs: move protection-keys.rst to the core-api book 2019-06-08 13:42:12 -06:00
refcount-vs-atomic.rst
timekeeping.rst It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
tracepoint.rst
workqueue.rst
xarray.rst docs: remove :c:func: annotations from xarray.rst 2019-06-26 11:14:15 -06:00