Skip to content

Commit

Permalink
[media] touptek: cast char types on %x printk
Browse files Browse the repository at this point in the history
This fixes those two smatch warnings:
	drivers/media/usb/gspca/touptek.c:206 val_reply() warn: argument 3 to %02x specifier has type 'char'
	drivers/media/usb/gspca/touptek.c:222 reg_w() warn: argument 4 to %02x specifier has type 'char'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Mauro Carvalho Chehab committed Mar 10, 2016
1 parent ad72204 commit 778f2a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/usb/gspca/touptek.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static int val_reply(struct gspca_dev *gspca_dev, const char *reply, int rc)
return -EIO;
}
if (reply[0] != 0x08) {
PERR("Bad reply 0x%02X", reply[0]);
PERR("Bad reply 0x%02x", (int)reply[0]);
return -EIO;
}
return 0;
Expand All @@ -219,7 +219,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index)
value, index);
rc = usb_control_msg(gspca_dev->dev, usb_rcvctrlpipe(gspca_dev->dev, 0),
0x0B, 0xC0, value, index, buff, 1, 500);
PDEBUG(D_USBO, "rc=%d, ret={0x%02X}", rc, buff[0]);
PDEBUG(D_USBO, "rc=%d, ret={0x%02x}", rc, (int)buff[0]);
if (rc < 0) {
PERR("Failed reg_w(0x0B, 0xC0, 0x%04X, 0x%04X) w/ rc %d\n",
value, index, rc);
Expand Down

0 comments on commit 778f2a3

Please sign in to comment.