diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-02-20 14:47:30 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-25 01:13:35 +0200 |
commit | 99c14e4df6144bca12dcac657266a7b8216aaa16 (patch) | |
tree | cf213921916517a012e4bfe0375c7a5dbafc7fc2 /drivers/rtc | |
parent | 607b8fc90d3bd8121ab00ac824e6bd2e1a6a2e6e (diff) | |
download | talos-op-linux-99c14e4df6144bca12dcac657266a7b8216aaa16.tar.gz talos-op-linux-99c14e4df6144bca12dcac657266a7b8216aaa16.zip |
rtc: mc13xxx: fix obfuscated and wrong format string
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@rasmusvillemoes.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-mc13xxx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index 32df1d812367..a65868065743 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c @@ -216,7 +216,7 @@ static int mc13xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) s1970 = rtc_tm_to_time64(&alarm->time); - dev_dbg(dev, "%s: o%2.s %lld\n", __func__, alarm->enabled ? "n" : "ff", + dev_dbg(dev, "%s: %s %lld\n", __func__, alarm->enabled ? "on" : "off", (long long)s1970); ret = mc13xxx_rtc_irq_enable_unlocked(dev, alarm->enabled, |