From 9ccfc756a70d454dfa82f48897e2883560c01a0e Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 2 Oct 2005 11:45:08 -0500 Subject: [SCSI] move the mid-layer printk's over to shost/starget/sdev_printk This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley --- drivers/scsi/sg.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'drivers/scsi/sg.c') diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index fd56b7ec88b6..49b9269d487a 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1497,10 +1497,9 @@ static int sg_alloc(struct gendisk *disk, struct scsi_device *scsidp) overflow: write_unlock_irqrestore(&sg_dev_arr_lock, iflags); - printk(KERN_WARNING - "Unable to attach sg device <%d, %d, %d, %d> type=%d, minor " - "number exceeds %d\n", scsidp->host->host_no, scsidp->channel, - scsidp->id, scsidp->lun, scsidp->type, SG_MAX_DEVS - 1); + sdev_printk(KERN_WARNING, scsidp, + "Unable to attach sg device type=%d, minor " + "number exceeds %d\n", scsidp->type, SG_MAX_DEVS - 1); error = -ENODEV; goto out; } @@ -1566,11 +1565,8 @@ sg_add(struct class_device *cl_dev) } else printk(KERN_WARNING "sg_add: sg_sys INvalid\n"); - printk(KERN_NOTICE - "Attached scsi generic sg%d at scsi%d, channel" - " %d, id %d, lun %d, type %d\n", k, - scsidp->host->host_no, scsidp->channel, scsidp->id, - scsidp->lun, scsidp->type); + sdev_printk(KERN_NOTICE, scsidp, + "Attached scsi generic sg%d type %d\n", k,scsidp->type); return 0; -- cgit v1.2.3