Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/pmac/smu: Use %*ph to print small buffers

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Andy Shevchenko and committed by
Benjamin Herrenschmidt
ebd004e4 28d170ab

+4 -7
+1 -5
drivers/macintosh/smu.c
··· 120 120 121 121 DPRINTK("SMU: starting cmd %x, %d bytes data\n", cmd->cmd, 122 122 cmd->data_len); 123 - DPRINTK("SMU: data buffer: %02x %02x %02x %02x %02x %02x %02x %02x\n", 124 - ((u8 *)cmd->data_buf)[0], ((u8 *)cmd->data_buf)[1], 125 - ((u8 *)cmd->data_buf)[2], ((u8 *)cmd->data_buf)[3], 126 - ((u8 *)cmd->data_buf)[4], ((u8 *)cmd->data_buf)[5], 127 - ((u8 *)cmd->data_buf)[6], ((u8 *)cmd->data_buf)[7]); 123 + DPRINTK("SMU: data buffer: %8ph\n", cmd->data_buf); 128 124 129 125 /* Fill the SMU command buffer */ 130 126 smu->cmd_buf->cmd = cmd->cmd;
+3 -2
drivers/macintosh/via-pmu.c
··· 750 750 voltage = (req->reply[8] << 8) | req->reply[9]; 751 751 break; 752 752 default: 753 - printk(KERN_WARNING "pmu.c : unrecognized battery info, len: %d, %02x %02x %02x %02x\n", 754 - req->reply_len, req->reply[0], req->reply[1], req->reply[2], req->reply[3]); 753 + pr_warn("pmu.c: unrecognized battery info, " 754 + "len: %d, %4ph\n", req->reply_len, 755 + req->reply); 755 756 break; 756 757 } 757 758 }