drivers/rtc/rtc-rs5c372.c: use %*ph to dump small buffers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 13 Oct 2014 22:53:12 +0000 (15:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2014 00:18:19 +0000 (02:18 +0200)
Instead of pushing each byte let's reduce stack usage by using %*ph specifier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-rs5c372.c

index ccf54f06396bf251bf42be6007c40db21b84a5c6..28871cd7e3b592681d0839b2830b710e4bce0d60 100644 (file)
@@ -142,12 +142,11 @@ static int rs5c_get_regs(struct rs5c372 *rs5c)
        }
 
        dev_dbg(&client->dev,
-               "%02x %02x %02x (%02x) %02x %02x %02x (%02x), "
-               "%02x %02x %02x, %02x %02x %02x; %02x %02x\n",
-               rs5c->regs[0],  rs5c->regs[1],  rs5c->regs[2],  rs5c->regs[3],
-               rs5c->regs[4],  rs5c->regs[5],  rs5c->regs[6],  rs5c->regs[7],
-               rs5c->regs[8],  rs5c->regs[9],  rs5c->regs[10], rs5c->regs[11],
-               rs5c->regs[12], rs5c->regs[13], rs5c->regs[14], rs5c->regs[15]);
+               "%3ph (%02x) %3ph (%02x), %3ph, %3ph; %02x %02x\n",
+               rs5c->regs + 0, rs5c->regs[3],
+               rs5c->regs + 4, rs5c->regs[7],
+               rs5c->regs + 8, rs5c->regs + 11,
+               rs5c->regs[14], rs5c->regs[15]);
 
        return 0;
 }