Skip to content

Commit

Permalink
[media] mceusb: use %*ph for small buffer dumps
Browse files Browse the repository at this point in the history
It makes the printk cleaner. As a side efect, it also fixes those smatch
warnings:
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 6 to %02x specifier has type 'char'
	drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 7 to %02x specifier has type 'char'

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Mar 10, 2016
1 parent de08b5a commit eef8fc3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/rc/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,8 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
if (len == 2)
dev_dbg(dev, "Get hw/sw rev?");
else
dev_dbg(dev, "hw/sw rev 0x%02x 0x%02x 0x%02x 0x%02x",
data1, data2,
buf[start + 4], buf[start + 5]);
dev_dbg(dev, "hw/sw rev %*ph",
4, &buf[start + 2]);
break;
case MCE_CMD_RESUME:
dev_dbg(dev, "Device resume requested");
Expand Down

0 comments on commit eef8fc3

Please sign in to comment.