Re: rtc: mc13xxx: fix obfuscated and wrong format string

From: Alexandre Belloni
Date: Mon May 11 2015 - 03:26:22 EST


On 20/02/2015 at 14:47:30 +0100, Rasmus Villemoes wrote :
> According to C99, %2.s means 'print two spaces' (a precision of
> . without following digits or * means 0). The kernel's printf
> implementation, however, treats that case as if no precision was
> given, but relying on that quirk is rather silly. Also, since no -
> (aka left-justify) flag is given, the field with of 2 would then cause
> the alarm->enabled case to come out as "o n". Deobfuscate it.
>
> Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
> ---
> drivers/rtc/rtc-mc13xxx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Rebased and applied on rtc-next, thanks.


--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/