Skip to content

Commit

Permalink
USB: Fix debug output of ark3116
Browse files Browse the repository at this point in the history
Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit
archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is
taken as signed char, which is promoted to signed int, while %x always
expects an unsigned int.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jan Engelhardt authored and Greg Kroah-Hartman committed May 23, 2007
1 parent 09b7002 commit b268f48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/serial/ark3116.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ static inline void ARK3116_RCV(struct usb_serial *serial, int seq,
request, requesttype, value, index,
buf, 0x0000001, 1000);
if (result)
dbg("%03d < %d bytes [0x%02X]", seq, result, buf[0]);
dbg("%03d < %d bytes [0x%02X]", seq, result,
((unsigned char *)buf)[0]);
else
dbg("%03d < 0 bytes", seq);
}
Expand Down

0 comments on commit b268f48

Please sign in to comment.