* [PATCH] macintosh: use %*ph to print small buffers
@ 2013-04-22 13:02 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2013-04-22 13:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Andy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/macintosh/smu.c | 6 +-----
drivers/macintosh/via-pmu.c | 5 +++--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 9c6b964..b3b2d36 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -120,11 +120,7 @@ static void smu_start_cmd(void)
DPRINTK("SMU: starting cmd %x, %d bytes data\n", cmd->cmd,
cmd->data_len);
- DPRINTK("SMU: data buffer: %02x %02x %02x %02x %02x %02x %02x %02x\n",
- ((u8 *)cmd->data_buf)[0], ((u8 *)cmd->data_buf)[1],
- ((u8 *)cmd->data_buf)[2], ((u8 *)cmd->data_buf)[3],
- ((u8 *)cmd->data_buf)[4], ((u8 *)cmd->data_buf)[5],
- ((u8 *)cmd->data_buf)[6], ((u8 *)cmd->data_buf)[7]);
+ DPRINTK("SMU: data buffer: %8ph\n", cmd->data_buf);
/* Fill the SMU command buffer */
smu->cmd_buf->cmd = cmd->cmd;
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index c31fbab..283e1b5 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -750,8 +750,9 @@ done_battery_state_smart(struct adb_request* req)
voltage = (req->reply[8] << 8) | req->reply[9];
break;
default:
- printk(KERN_WARNING "pmu.c : unrecognized battery info, len: %d, %02x %02x %02x %02x\n",
- req->reply_len, req->reply[0], req->reply[1], req->reply[2], req->reply[3]);
+ pr_warn("pmu.c: unrecognized battery info, "
+ "len: %d, %4ph\n", req->reply_len,
+ req->reply);
break;
}
}
--
1.8.2.rc0.22.gb3600c3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-22 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 13:02 [PATCH] macintosh: use %*ph to print small buffers Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).