* [PATCH 2/4] sd: fix printk() levels
@ 2009-04-29 20:07 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2009-04-29 20:07 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
Fix
WARNING: printk() should include KERN_ facility level
issues detected by checkpatch.pl.
While at it:
- fix whitespace damage in sd_ioctl()
- use __func__ in sd_ioctl(), init_sd() and exit_sd()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/scsi/sd.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
Index: b/drivers/scsi/sd.c
===================================================================
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -748,9 +748,9 @@ static int sd_ioctl(struct block_device
struct scsi_device *sdp = scsi_disk(disk)->device;
void __user *p = (void __user *)arg;
int error;
-
- SCSI_LOG_IOCTL(1, printk("sd_ioctl: disk=%s, cmd=0x%x\n",
- disk->disk_name, cmd));
+
+ SCSI_LOG_IOCTL(1, printk(KERN_INFO "%s: disk=%s, cmd=0x%x\n",
+ __func__, disk->disk_name, cmd));
/*
* If we are in the middle of error recovery, don't let anyone
@@ -1191,7 +1191,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
}
/* Wait 1 second for next try */
msleep(1000);
- printk(".");
+ printk(KERN_CONT ".");
/*
* Wait for USB flash devices with slow firmware.
@@ -1221,9 +1221,9 @@ sd_spinup_disk(struct scsi_disk *sdkp)
if (spintime) {
if (scsi_status_is_good(the_result))
- printk("ready\n");
+ printk(KERN_CONT "ready\n");
else
- printk("not responding...\n");
+ printk(KERN_CONT "not responding...\n");
}
}
@@ -2203,7 +2203,8 @@ static int __init init_sd(void)
{
int majors = 0, i, err;
- SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n"));
+ SCSI_LOG_HLQUEUE(3, printk(KERN_INFO "%s: sd driver entry point\n",
+ __func__));
for (i = 0; i < SD_MAJORS; i++)
if (register_blkdev(sd_major(i), "sd") == 0)
@@ -2239,7 +2240,8 @@ static void __exit exit_sd(void)
{
int i;
- SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
+ SCSI_LOG_HLQUEUE(3, printk(KERN_INFO "%s: exiting sd driver\n",
+ __func__));
scsi_unregister_driver(&sd_template.gendrv);
class_unregister(&sd_disk_class);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-29 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 20:07 [PATCH 2/4] sd: fix printk() levels Bartlomiej Zolnierkiewicz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.