[PATCH] fix printk format compiler warnings - Kernel

This is a discussion on [PATCH] fix printk format compiler warnings - Kernel ; %llx and the like cannot be used on u64-derived data types - they must
be cast to long long explicitly for arch-es where u64 is a typedef of
unsigned long (ia64 is where I observed the problem).
Signed-off-by: Jan Beulich
...

I suppose. They only appear with certain configs and are fairly harmless, so
I wasn't planning on pushing them into 2.6.27. But I'll include it in my
next pull request anyway, since you're such a cool guy and I want to make you
happy (assuming 2.6.27 proper isn't released in the next couple of
day...)

While `L' is used as an internal flag in Linux' vsnprintf() implementation and
is still supported because of historical (pre-C99) reasons, the `L' conversion
qualifier is meant for the `long double' floating point type, as per C99.
The recommended conversion qualifier for the `long long' integer type is `ll'.

Perhaps checkpatch should check for this? Ah, it already does for some of the
integer formats. The patch below adds checks for the missing ones.

Subject: [PATCH] checkpatch: Check for %L for all integer formats

Checkpatch checks for the use of the non-standard `L' conversion qualifier for
some (`u', `d', and `i') of the 6 integers formats. Add the missing ones
(`o', `x', and `X'), and keep the list sorted.

Because it's one byte shorter.
>While `L' is used as an internal flag in Linux' vsnprintf() implementation and
>is still supported because of historical (pre-C99) reasons, the `L' conversion
>qualifier is meant for the `long double' floating point type, as per C99.
>The recommended conversion qualifier for the `long long' integer type is `ll'.

I understand all of this, but can't see why you would care about floating point
formats in the kernel (when specifically you know that vsnprintf() & Co aren't
able to handle it anyway).

So I think rather than widening the set of specifiers checkpatch looks for, the
check should rather be removed altogether.