Thread (9 messages) read the whole thread 9 messages, 4 authors, 2020-12-26

Re: [PATCH] nfp: remove h from printk format specifier

From: Tom Rix <trix@redhat.com>
Date: 2020-12-25 22:14:56
Also in: bpf, lkml

On 12/25/20 9:06 AM, Joe Perches wrote:
On Fri, 2020-12-25 at 06:56 -0800, Tom Rix wrote:
quoted
On 12/24/20 2:39 PM, Joe Perches wrote:
[]
quoted
quoted
Kernel code doesn't use a signed char or short with %hx or %hu very often
but in case you didn't already know, any signed char/short emitted with
anything like %hx or %hu needs to be left alone as sign extension occurs so:
Yes, this would also effect checkpatch.
Of course but checkpatch is stupid and doesn't know types
so it just assumes that the type argument is not signed.

In general, that's a reasonable but imperfect assumption.

coccinelle could probably do this properly as it's a much
better parser.  clang-tidy should be able to as well.
Ok.

But types not matching the format string is a larger problem.

Has there been an effort to clean these up ?

Tom
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help