diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-25 02:04:06 +0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-29 05:52:11 +0400 |
commit | 3bf743e7c891d8be8295650b7a6a9b5af083b096 (patch) | |
tree | cb44772c2ca37f696300ca197b89e247f83c94d7 /drivers/scsi | |
parent | 01d7b3b8d09ef78e2c835c03d97ea1d91c26e245 (diff) | |
download | linux-3bf743e7c891d8be8295650b7a6a9b5af083b096.tar.xz |
[SCSI] use {sdev,scmd,starget,shost}_printk in generic code
rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi.c | 5 | ||||
-rw-r--r-- | drivers/scsi/scsi_debug.c | 15 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 7 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 15 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 17 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 10 | ||||
-rw-r--r-- | drivers/scsi/st.c | 3 |
7 files changed, 33 insertions, 39 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 071d109b4b2a..0be60bba58d3 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -889,8 +889,9 @@ void scsi_finish_command(struct scsi_cmnd *cmd) if (SCSI_SENSE_VALID(cmd)) cmd->result |= (DRIVER_SENSE << 24); - SCSI_LOG_MLCOMPLETE(4, printk("Notifying upper driver of completion " - "for device %d %x\n", sdev->id, cmd->result)); + SCSI_LOG_MLCOMPLETE(4, sdev_printk(KERN_INFO, sdev, + "Notifying upper driver of completion " + "(result %x)\n", cmd->result)); /* * We can get here with use_sg=0, causing a panic in the upper level diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 322b5a41a36f..add190e22c0f 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -1008,8 +1008,7 @@ static void timer_intr_handler(unsigned long indx) static int scsi_debug_slave_alloc(struct scsi_device * sdp) { if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_alloc\n"); return 0; } @@ -1018,8 +1017,7 @@ static int scsi_debug_slave_configure(struct scsi_device * sdp) struct sdebug_dev_info * devip; if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_configure\n"); if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; devip = devInfoReg(sdp); @@ -1036,8 +1034,7 @@ static void scsi_debug_slave_destroy(struct scsi_device * sdp) (struct sdebug_dev_info *)sdp->hostdata; if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_destroy\n"); if (devip) { /* make this slot avaliable for re-use */ devip->used = 0; @@ -1326,9 +1323,9 @@ static int schedule_resp(struct scsi_cmnd * cmnd, if (scsi_result) { struct scsi_device * sdp = cmnd->device; - printk(KERN_INFO "scsi_debug: <%u %u %u %u> " - "non-zero result=0x%x\n", sdp->host->host_no, - sdp->channel, sdp->id, sdp->lun, scsi_result); + sdev_printk(KERN_INFO, sdp, + "non-zero result=0x%x\n", + scsi_result); } } if (cmnd && devip) { diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index dd6a9f61bdf1..f4da56a79ff6 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -673,10 +673,9 @@ static int scsi_eh_get_sense(struct list_head *work_q, SCSI_SENSE_VALID(scmd)) continue; - SCSI_LOG_ERROR_RECOVERY(2, printk("%s: requesting sense" - " for id: %d\n", - current->comm, - scmd->device->id)); + SCSI_LOG_ERROR_RECOVERY(2, scmd_printk(KERN_INFO, scmd, + "%s: requesting sense\n", + current->comm)); rtn = scsi_request_sense(scmd); if (rtn != SUCCESS) continue; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 19ac888001e6..e40c8b66da40 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -951,16 +951,14 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes, return; } if (!(req->flags & REQ_QUIET)) - sdev_printk(KERN_INFO, - cmd->device, - "Device not ready.\n"); + scmd_printk(KERN_INFO, cmd, + "Device not ready.\n"); scsi_end_request(cmd, 0, this_count, 1); return; case VOLUME_OVERFLOW: if (!(req->flags & REQ_QUIET)) { - sdev_printk(KERN_INFO, - cmd->device, - "Volume overflow, CDB: "); + scmd_printk(KERN_INFO, cmd, + "Volume overflow, CDB: "); __scsi_print_command(cmd->data_cmnd); scsi_print_sense("", cmd); } @@ -981,9 +979,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes, } if (result) { if (!(req->flags & REQ_QUIET)) { - sdev_printk(KERN_INFO, cmd->device, - "SCSI error: return code = 0x%x\n", - result); + scmd_printk(KERN_INFO, cmd, + "SCSI error: return code = 0x%x\n", result); if (driver_byte(result) & DRIVER_SENSE) scsi_print_sense("", cmd); diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index e8f6fee34c94..7eb3a2d40dc5 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1189,9 +1189,8 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, num_luns = max_scsi_report_luns; } - SCSI_LOG_SCAN_BUS(3, printk (KERN_INFO "scsi scan: REPORT LUN scan of" - " host %d channel %d id %d\n", sdev->host->host_no, - sdev->channel, sdev->id)); + SCSI_LOG_SCAN_BUS(3, sdev_printk (KERN_INFO, sdev, + "scsi scan: REPORT LUN scan\n")); /* * Scan the luns in lun_data. The entry at offset 0 is really @@ -1230,9 +1229,10 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, /* * Got some results, but now none, abort. */ - printk(KERN_ERR "scsi: Unexpected response" - " from %s lun %d while scanning, scan" - " aborted\n", devname, lun); + sdev_printk(KERN_ERR, sdev, + "Unexpected response" + " from lun %d while scanning, scan" + " aborted\n", lun); break; } } @@ -1417,8 +1417,9 @@ static void scsi_scan_channel(struct Scsi_Host *shost, unsigned int channel, int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel, unsigned int id, unsigned int lun, int rescan) { - SCSI_LOG_SCAN_BUS(3, printk (KERN_INFO "%s: <%u:%u:%u:%u>\n", - __FUNCTION__, shost->host_no, channel, id, lun)); + SCSI_LOG_SCAN_BUS(3, shost_printk (KERN_INFO, shost, + "%s: <%u:%u:%u>\n", + __FUNCTION__, channel, id, lun)); if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) || ((id != SCAN_WILD_CARD) && (id > shost->max_id)) || diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 3067e5a7b75e..d68cea753bb2 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -360,7 +360,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) } if (s_size != 512 && s_size != 1024 && s_size != 2048) { - sdev_printk(KERN_ERR, SCpnt->device, "bad sector size %d\n", s_size); + scmd_printk(KERN_ERR, SCpnt, "bad sector size %d\n", s_size); return 0; } @@ -385,9 +385,9 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) size += sg[i].length; if (size != SCpnt->request_bufflen && SCpnt->use_sg) { - sdev_printk(KERN_ERR, SCpnt->device, - "mismatch count %d, bytes %d\n", - size, SCpnt->request_bufflen); + scmd_printk(KERN_ERR, SCpnt, + "mismatch count %d, bytes %d\n", + size, SCpnt->request_bufflen); if (SCpnt->request_bufflen > size) SCpnt->request_bufflen = SCpnt->bufflen = size; } @@ -398,7 +398,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) */ if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) || (SCpnt->request_bufflen % s_size)) { - sdev_printk(KERN_NOTICE, SCpnt->device, "unaligned transfer\n"); + scmd_printk(KERN_NOTICE, SCpnt, "unaligned transfer\n"); return 0; } diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index dc5ffc16a252..2913f8792317 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -3887,8 +3887,7 @@ static int st_probe(struct device *dev) if (SDp->type != TYPE_TAPE) return -ENODEV; if ((stp = st_incompatible(SDp))) { - sdev_printk(KERN_INFO, SDp, - "Found incompatible tape\n"); + sdev_printk(KERN_INFO, SDp, "Found incompatible tape\n"); printk(KERN_INFO "st: The suggested driver is %s.\n", stp); return -ENODEV; } |