diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2012-06-04 22:28:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-06 13:36:47 -0400 |
commit | 027253c138a12b075e724f94b6cc43fd7071c14f (patch) | |
tree | ba6d216268c4c545cfd3be2241526ede6e08225f /drivers/ide/icside.c | |
parent | 32a527add871a51b3c06177849d18bf71e33b320 (diff) |
ide: icside.c: fix printk format string compile warning
Use correct format string parameter for the peak datarate, and prevent
uninitialized use of cycle_time.
Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide/icside.c')
-rw-r--r-- | drivers/ide/icside.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 83e5100d73f6..bcb507b0cfd4 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -236,7 +236,7 @@ static const struct ide_port_ops icside_v6_no_dma_port_ops = { | |||
236 | */ | 236 | */ |
237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
238 | { | 238 | { |
239 | unsigned long cycle_time; | 239 | unsigned long cycle_time = 0; |
240 | int use_dma_info = 0; | 240 | int use_dma_info = 0; |
241 | const u8 xfer_mode = drive->dma_mode; | 241 | const u8 xfer_mode = drive->dma_mode; |
242 | 242 | ||
@@ -271,9 +271,9 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
271 | 271 | ||
272 | ide_set_drivedata(drive, (void *)cycle_time); | 272 | ide_set_drivedata(drive, (void *)cycle_time); |
273 | 273 | ||
274 | printk("%s: %s selected (peak %dMB/s)\n", drive->name, | 274 | printk(KERN_INFO "%s: %s selected (peak %luMB/s)\n", |
275 | ide_xfer_verbose(xfer_mode), | 275 | drive->name, ide_xfer_verbose(xfer_mode), |
276 | 2000 / (unsigned long)ide_get_drivedata(drive)); | 276 | 2000 / (cycle_time ? cycle_time : (unsigned long) -1)); |
277 | } | 277 | } |
278 | 278 | ||
279 | static const struct ide_port_ops icside_v6_port_ops = { | 279 | static const struct ide_port_ops icside_v6_port_ops = { |