powerpc/pmac/smu: Use %*ph to print small buffers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 22 Apr 2013 03:02:19 +0000 (03:02 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 23 Apr 2013 06:39:31 +0000 (16:39 +1000)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/macintosh/smu.c
drivers/macintosh/via-pmu.c

index 9c6b964148628db7d626c2b5962ccc6b159c8aa8..b3b2d36c009e042e25d5e50fe0aa4d29b04295b4 100644 (file)
@@ -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;
index 22b8ce4191ccd69d6b8740c61a71791efafd31bf..c9c85426f4ff55c60fc995dc5e9eb59e554b2c66 100644 (file)
@@ -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;
                }
        }