aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-03-29 10:37:37 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-13 11:13:29 -0400
commitfb3ed3cb4b8ba84e5b0899ef752495f213973843 (patch)
treeb806543e5410730215b5533c56b7b9d5158e4d7d /drivers
parentfe964d0a4bfa7c25e75c53d81acbf53099777e9e (diff)
[SCSI] ipr: printk macro cleanup/removal
Remove some unused printk macros, make some more robust, and convert some to use standard printk macros when possible. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ipr.c15
-rw-r--r--drivers/scsi/ipr.h25
2 files changed, 14 insertions, 26 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index dd5c96239e06..695799699131 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -1333,8 +1333,8 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg,
1333 return; 1333 return;
1334 1334
1335 if (ipr_is_device(&hostrcb->hcam.u.error.failing_dev_res_addr)) { 1335 if (ipr_is_device(&hostrcb->hcam.u.error.failing_dev_res_addr)) {
1336 ipr_res_err(ioa_cfg, hostrcb->hcam.u.error.failing_dev_res_addr, 1336 ipr_ra_err(ioa_cfg, hostrcb->hcam.u.error.failing_dev_res_addr,
1337 "%s\n", ipr_error_table[error_index].error); 1337 "%s\n", ipr_error_table[error_index].error);
1338 } else { 1338 } else {
1339 dev_err(&ioa_cfg->pdev->dev, "%s\n", 1339 dev_err(&ioa_cfg->pdev->dev, "%s\n",
1340 ipr_error_table[error_index].error); 1340 ipr_error_table[error_index].error);
@@ -3332,7 +3332,7 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
3332 cmd_pkt->request_type = IPR_RQTYPE_IOACMD; 3332 cmd_pkt->request_type = IPR_RQTYPE_IOACMD;
3333 cmd_pkt->cdb[0] = IPR_RESET_DEVICE; 3333 cmd_pkt->cdb[0] = IPR_RESET_DEVICE;
3334 3334
3335 ipr_sdev_err(scsi_cmd->device, "Resetting device\n"); 3335 scmd_printk(KERN_ERR, scsi_cmd, "Resetting device\n");
3336 ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT); 3336 ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT);
3337 3337
3338 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 3338 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
@@ -3417,7 +3417,7 @@ static void ipr_abort_timeout(struct ipr_cmnd *ipr_cmd)
3417 return; 3417 return;
3418 } 3418 }
3419 3419
3420 ipr_sdev_err(ipr_cmd->u.sdev, "Abort timed out. Resetting bus\n"); 3420 sdev_printk(KERN_ERR, ipr_cmd->u.sdev, "Abort timed out. Resetting bus.\n");
3421 reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); 3421 reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
3422 ipr_cmd->sibling = reset_cmd; 3422 ipr_cmd->sibling = reset_cmd;
3423 reset_cmd->sibling = ipr_cmd; 3423 reset_cmd->sibling = ipr_cmd;
@@ -3481,7 +3481,8 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd)
3481 cmd_pkt->cdb[0] = IPR_CANCEL_ALL_REQUESTS; 3481 cmd_pkt->cdb[0] = IPR_CANCEL_ALL_REQUESTS;
3482 ipr_cmd->u.sdev = scsi_cmd->device; 3482 ipr_cmd->u.sdev = scsi_cmd->device;
3483 3483
3484 ipr_sdev_err(scsi_cmd->device, "Aborting command: %02X\n", scsi_cmd->cmnd[0]); 3484 scmd_printk(KERN_ERR, scsi_cmd, "Aborting command: %02X\n",
3485 scsi_cmd->cmnd[0]);
3485 ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT); 3486 ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT);
3486 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 3487 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
3487 3488
@@ -3792,8 +3793,8 @@ static void ipr_erp_done(struct ipr_cmnd *ipr_cmd)
3792 3793
3793 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) { 3794 if (IPR_IOASC_SENSE_KEY(ioasc) > 0) {
3794 scsi_cmd->result |= (DID_ERROR << 16); 3795 scsi_cmd->result |= (DID_ERROR << 16);
3795 ipr_sdev_err(scsi_cmd->device, 3796 scmd_printk(KERN_ERR, scsi_cmd,
3796 "Request Sense failed with IOASC: 0x%08X\n", ioasc); 3797 "Request Sense failed with IOASC: 0x%08X\n", ioasc);
3797 } else { 3798 } else {
3798 memcpy(scsi_cmd->sense_buffer, ipr_cmd->sense_buffer, 3799 memcpy(scsi_cmd->sense_buffer, ipr_cmd->sense_buffer,
3799 SCSI_SENSE_BUFFERSIZE); 3800 SCSI_SENSE_BUFFERSIZE);
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index c08bd2f238e3..cbaa4964429a 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1192,30 +1192,17 @@ struct ipr_ucode_image_header {
1192 */ 1192 */
1193#define ipr_err(...) printk(KERN_ERR IPR_NAME ": "__VA_ARGS__) 1193#define ipr_err(...) printk(KERN_ERR IPR_NAME ": "__VA_ARGS__)
1194#define ipr_info(...) printk(KERN_INFO IPR_NAME ": "__VA_ARGS__) 1194#define ipr_info(...) printk(KERN_INFO IPR_NAME ": "__VA_ARGS__)
1195#define ipr_crit(...) printk(KERN_CRIT IPR_NAME ": "__VA_ARGS__)
1196#define ipr_warn(...) printk(KERN_WARNING IPR_NAME": "__VA_ARGS__)
1197#define ipr_dbg(...) IPR_DBG_CMD(printk(KERN_INFO IPR_NAME ": "__VA_ARGS__)) 1195#define ipr_dbg(...) IPR_DBG_CMD(printk(KERN_INFO IPR_NAME ": "__VA_ARGS__))
1198 1196
1199#define ipr_sdev_printk(level, sdev, fmt, args...) \ 1197#define ipr_ra_printk(level, ioa_cfg, ra, fmt, ...) \
1200 sdev_printk(level, sdev, fmt, ## args) 1198 printk(level IPR_NAME ": %d:%d:%d:%d: " fmt, (ioa_cfg)->host->host_no, \
1199 (ra).bus, (ra).target, (ra).lun, ##__VA_ARGS__)
1201 1200
1202#define ipr_sdev_err(sdev, fmt, ...) \ 1201#define ipr_ra_err(ioa_cfg, ra, fmt, ...) \
1203 ipr_sdev_printk(KERN_ERR, sdev, fmt, ##__VA_ARGS__) 1202 ipr_ra_printk(KERN_ERR, ioa_cfg, ra, fmt, ##__VA_ARGS__)
1204
1205#define ipr_sdev_info(sdev, fmt, ...) \
1206 ipr_sdev_printk(KERN_INFO, sdev, fmt, ##__VA_ARGS__)
1207
1208#define ipr_sdev_dbg(sdev, fmt, ...) \
1209 IPR_DBG_CMD(ipr_sdev_printk(KERN_INFO, sdev, fmt, ##__VA_ARGS__))
1210
1211#define ipr_res_printk(level, ioa_cfg, res, fmt, ...) \
1212 printk(level IPR_NAME ": %d:%d:%d:%d: " fmt, ioa_cfg->host->host_no, \
1213 res.bus, res.target, res.lun, ##__VA_ARGS__)
1214 1203
1215#define ipr_res_err(ioa_cfg, res, fmt, ...) \ 1204#define ipr_res_err(ioa_cfg, res, fmt, ...) \
1216 ipr_res_printk(KERN_ERR, ioa_cfg, res, fmt, ##__VA_ARGS__) 1205 ipr_ra_err(ioa_cfg, (res)->cfgte.res_addr, fmt, ##__VA_ARGS__)
1217#define ipr_res_dbg(ioa_cfg, res, fmt, ...) \
1218 IPR_DBG_CMD(ipr_res_printk(KERN_INFO, ioa_cfg, res, fmt, ##__VA_ARGS__))
1219 1206
1220#define ipr_phys_res_err(ioa_cfg, res, fmt, ...) \ 1207#define ipr_phys_res_err(ioa_cfg, res, fmt, ...) \
1221{ \ 1208{ \