diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-06-21 11:02:39 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-13 05:16:31 +0200 |
commit | 40e4c0a4e1d5414ed33e5bc846a832dc868fa65d (patch) | |
tree | 4078790c1bd3daa1b5855267291bdb7fbb6eed16 /COPYING | |
parent | scsi: libfc: fix seconds_since_last_reset calculation (diff) | |
download | linux-40e4c0a4e1d5414ed33e5bc846a832dc868fa65d.tar.xz linux-40e4c0a4e1d5414ed33e5bc846a832dc868fa65d.zip |
scsi: wd7000: print sector number as 64-bit
Enabling format checking in dprintk() shows that wd7000_biosparam uses
an incorrect format string for sector_t:
drivers/scsi/wd7000.c: In function 'wd7000_biosparam':
drivers/scsi/wd7000.c:1594:21: error: format '%d' expects argument of type 'int', but argument 3 has type 'sector_t {aka long long unsigned int}' [-Werror=format=]
As sector_t can be 32-bit wide, this adds a cast to 'u64' and prints
that with the correct format. The change to use no_printk() generally
helps with finding this kind of hidden format string bug, and I found
that when building with "-Wextra", which warned about an empty else
clause in
} else
dprintk("ok!\n");
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions