Skip to content

Commit

Permalink
scsi: aha152x: Fix sparse warning and make printing pointer address m…
Browse files Browse the repository at this point in the history
…ore portable.

This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt,
which also takes care about the following warning during compilation time:

  drivers/scsi/aha152x.c: In function ‘get_command’:
  drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of different size

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Krzysztof Wilczynski authored and Jiri Kosina committed Jul 20, 2012
1 parent 90b24cf commit b631cf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/aha152x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,8 +2984,8 @@ static int get_command(char *pos, Scsi_Cmnd * ptr)
char *start = pos;
int i;

SPRINTF("0x%08x: target=%d; lun=%d; cmnd=( ",
(unsigned int) ptr, ptr->device->id, ptr->device->lun);
SPRINTF("%p: target=%d; lun=%d; cmnd=( ",
ptr, ptr->device->id, ptr->device->lun);

for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++)
SPRINTF("0x%02x ", ptr->cmnd[i]);
Expand Down

0 comments on commit b631cf1

Please sign in to comment.