diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-11-24 14:51:23 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-01-11 20:19:58 +0100 |
commit | ff67abd236ca7b65ea632f476f0f0cfc83aea711 (patch) | |
tree | 743a242cd807c95e21f7b1878df156a73bbba08e /drivers/rtc/rtc-ds1305.c | |
parent | 2ad2c17480b6208a35a4ffb937effe0ba1ed39de (diff) | |
download | lwn-ff67abd236ca7b65ea632f476f0f0cfc83aea711.tar.gz lwn-ff67abd236ca7b65ea632f476f0f0cfc83aea711.zip |
rtc: use %ph for short hex dumps
This makes the generated code slightly smaller.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1305.c')
-rw-r--r-- | drivers/rtc/rtc-ds1305.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 85706a9f82c9..f39691eea736 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c @@ -186,9 +186,7 @@ static int ds1305_get_time(struct device *dev, struct rtc_time *time) if (status < 0) return status; - dev_vdbg(dev, "%s: %02x %02x %02x, %02x %02x %02x %02x\n", - "read", buf[0], buf[1], buf[2], buf[3], - buf[4], buf[5], buf[6]); + dev_vdbg(dev, "%s: %3ph, %4ph\n", "read", &buf[0], &buf[3]); /* Decode the registers */ time->tm_sec = bcd2bin(buf[DS1305_SEC]); @@ -232,9 +230,7 @@ static int ds1305_set_time(struct device *dev, struct rtc_time *time) *bp++ = bin2bcd(time->tm_mon + 1); *bp++ = bin2bcd(time->tm_year - 100); - dev_dbg(dev, "%s: %02x %02x %02x, %02x %02x %02x %02x\n", - "write", buf[1], buf[2], buf[3], - buf[4], buf[5], buf[6], buf[7]); + dev_dbg(dev, "%s: %3ph, %4ph\n", "write", &buf[1], &buf[4]); /* use write-then-read since dma from stack is nonportable */ return spi_write_then_read(ds1305->spi, buf, sizeof(buf), |