Skip to content

Commit

Permalink
powerpc/pmac/smu: Use %*ph to print small buffers
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Andy Shevchenko authored and Benjamin Herrenschmidt committed Apr 23, 2013
1 parent 28d170a commit ebd004e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit ebd004e

Please sign in to comment.