aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-10-02 12:45:08 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 15:23:02 -0400
commit9ccfc756a70d454dfa82f48897e2883560c01a0e (patch)
tree9a6d3b10b1ec0e5fe7a63252a21598a03e93ad4e /drivers/scsi/sg.c
parent9a41a62b74388827998253d62c58707e63cc5874 (diff)
[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 <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c14
1 files changed, 5 insertions, 9 deletions
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)
1497 1497
1498 overflow: 1498 overflow:
1499 write_unlock_irqrestore(&sg_dev_arr_lock, iflags); 1499 write_unlock_irqrestore(&sg_dev_arr_lock, iflags);
1500 printk(KERN_WARNING 1500 sdev_printk(KERN_WARNING, scsidp,
1501 "Unable to attach sg device <%d, %d, %d, %d> type=%d, minor " 1501 "Unable to attach sg device type=%d, minor "
1502 "number exceeds %d\n", scsidp->host->host_no, scsidp->channel, 1502 "number exceeds %d\n", scsidp->type, SG_MAX_DEVS - 1);
1503 scsidp->id, scsidp->lun, scsidp->type, SG_MAX_DEVS - 1);
1504 error = -ENODEV; 1503 error = -ENODEV;
1505 goto out; 1504 goto out;
1506} 1505}
@@ -1566,11 +1565,8 @@ sg_add(struct class_device *cl_dev)
1566 } else 1565 } else
1567 printk(KERN_WARNING "sg_add: sg_sys INvalid\n"); 1566 printk(KERN_WARNING "sg_add: sg_sys INvalid\n");
1568 1567
1569 printk(KERN_NOTICE 1568 sdev_printk(KERN_NOTICE, scsidp,
1570 "Attached scsi generic sg%d at scsi%d, channel" 1569 "Attached scsi generic sg%d type %d\n", k,scsidp->type);
1571 " %d, id %d, lun %d, type %d\n", k,
1572 scsidp->host->host_no, scsidp->channel, scsidp->id,
1573 scsidp->lun, scsidp->type);
1574 1570
1575 return 0; 1571 return 0;
1576 1572