Commit a7be265f authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] uses of ->rq_dev in printks

	* killed the uses of ->rq_dev in printks - several drivers.
parent e00ab6b6
...@@ -1263,8 +1263,8 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request ...@@ -1263,8 +1263,8 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
unsigned long block = (unsigned long)block_s; unsigned long block = (unsigned long)block_s;
#if IDEFLOPPY_DEBUG_LOG #if IDEFLOPPY_DEBUG_LOG
printk(KERN_INFO "rq_status: %d, rq_dev: %u, flags: %lx, errors: %d\n", printk(KERN_INFO "rq_status: %d, dev: %s, flags: %lx, errors: %d\n",
rq->rq_status, (unsigned int) rq->rq_dev, rq->rq_status, rq->rq_disk->disk_name,
rq->flags, rq->errors); rq->flags, rq->errors);
printk(KERN_INFO "sector: %ld, nr_sectors: %ld, " printk(KERN_INFO "sector: %ld, nr_sectors: %ld, "
"current_nr_sectors: %ld\n", (long)rq->sector, "current_nr_sectors: %ld\n", (long)rq->sector,
......
...@@ -2591,8 +2591,8 @@ static ide_startstop_t idetape_do_request (ide_drive_t *drive, struct request *r ...@@ -2591,8 +2591,8 @@ static ide_startstop_t idetape_do_request (ide_drive_t *drive, struct request *r
#if 0 #if 0
if (tape->debug_level >= 5) if (tape->debug_level >= 5)
printk(KERN_INFO "ide-tape: rq_status: %d, " printk(KERN_INFO "ide-tape: rq_status: %d, "
"rq_dev: %u, cmd: %ld, errors: %d\n", rq->rq_status, "dev: %s, cmd: %ld, errors: %d\n", rq->rq_status,
(unsigned int) rq->rq_dev, rq->flags, rq->errors); rq->rq_disk->disk_name, rq->flags, rq->errors);
#endif #endif
if (tape->debug_level >= 2) if (tape->debug_level >= 2)
printk(KERN_INFO "ide-tape: sector: %ld, " printk(KERN_INFO "ide-tape: sector: %ld, "
......
...@@ -1635,14 +1635,18 @@ static int aha1542_old_abort(Scsi_Cmnd * SCpnt) ...@@ -1635,14 +1635,18 @@ static int aha1542_old_abort(Scsi_Cmnd * SCpnt)
if (HOSTDATA(SCpnt->host)->SCint[i]) { if (HOSTDATA(SCpnt->host)->SCint[i]) {
if (HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { if (HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
printk(KERN_ERR "Timed out command pending for %s\n", printk(KERN_ERR "Timed out command pending for %s\n",
kdevname(SCpnt->request->rq_dev)); SCpnt->request->rq_disk ?
SCpnt->request->rq_disk->disk_name : "?"
);
if (HOSTDATA(SCpnt->host)->mb[i].status) { if (HOSTDATA(SCpnt->host)->mb[i].status) {
printk(KERN_ERR "OGMB still full - restarting\n"); printk(KERN_ERR "OGMB still full - restarting\n");
aha1542_out(SCpnt->host->io_port, &ahacmd, 1); aha1542_out(SCpnt->host->io_port, &ahacmd, 1);
}; };
} else } else
printk(KERN_ERR "Other pending command %s\n", printk(KERN_ERR "Other pending command %s\n",
kdevname(SCpnt->request->rq_dev)); SCpnt->request->rq_disk ?
SCpnt->request->rq_disk->disk_name : "?"
);
} }
#endif #endif
......
...@@ -905,12 +905,13 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) { ...@@ -905,12 +905,13 @@ scsi_show_extd_sense(unsigned char asc, unsigned char ascq) {
static void static void
print_sense_internal(const char * devclass, print_sense_internal(const char * devclass,
const unsigned char * sense_buffer, const unsigned char * sense_buffer,
kdev_t dev) struct request *req)
{ {
int s, sense_class, valid, code, info; int s, sense_class, valid, code, info;
const char * error = NULL; const char * error = NULL;
unsigned char asc, ascq; unsigned char asc, ascq;
const char *sense_txt; const char *sense_txt;
char *name = req->rq_disk ? req->rq_disk->disk_name : "?";
sense_class = (sense_buffer[0] >> 4) & 0x07; sense_class = (sense_buffer[0] >> 4) & 0x07;
code = sense_buffer[0] & 0xf; code = sense_buffer[0] & 0xf;
...@@ -954,10 +955,10 @@ print_sense_internal(const char * devclass, ...@@ -954,10 +955,10 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[2]); sense_txt = scsi_sense_key_string(sense_buffer[2]);
if (sense_txt) if (sense_txt)
printk("%s%s: sense key %s\n", printk("%s%s: sense key %s\n",
devclass, kdevname(dev), sense_txt); devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s%s: sense = %2x %2x\n",
devclass, kdevname(dev), devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
asc = ascq = 0; asc = ascq = 0;
...@@ -981,10 +982,10 @@ print_sense_internal(const char * devclass, ...@@ -981,10 +982,10 @@ print_sense_internal(const char * devclass,
sense_txt = scsi_sense_key_string(sense_buffer[0]); sense_txt = scsi_sense_key_string(sense_buffer[0]);
if (sense_txt) if (sense_txt)
printk("%s%s: old sense key %s\n", printk("%s%s: old sense key %s\n",
devclass, kdevname(dev), sense_txt); devclass, name, sense_txt);
else else
printk("%s%s: sense = %2x %2x\n", printk("%s%s: sense = %2x %2x\n",
devclass, kdevname(dev), devclass, name,
sense_buffer[0], sense_buffer[2]); sense_buffer[0], sense_buffer[2]);
printk("Non-extended sense class %d code 0x%0x\n", printk("Non-extended sense class %d code 0x%0x\n",
...@@ -1006,13 +1007,13 @@ print_sense_internal(const char * devclass, ...@@ -1006,13 +1007,13 @@ print_sense_internal(const char * devclass,
void print_sense(const char * devclass, Scsi_Cmnd * SCpnt) void print_sense(const char * devclass, Scsi_Cmnd * SCpnt)
{ {
print_sense_internal(devclass, SCpnt->sense_buffer, print_sense_internal(devclass, SCpnt->sense_buffer,
SCpnt->request->rq_dev); SCpnt->request);
} }
void print_req_sense(const char * devclass, Scsi_Request * SRpnt) void print_req_sense(const char * devclass, Scsi_Request * SRpnt)
{ {
print_sense_internal(devclass, SRpnt->sr_sense_buffer, print_sense_internal(devclass, SRpnt->sr_sense_buffer,
SRpnt->sr_request->rq_dev); SRpnt->sr_request);
} }
#if (CONSTANTS & CONST_MSG) #if (CONSTANTS & CONST_MSG)
......
...@@ -489,7 +489,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) ...@@ -489,7 +489,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block) static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block)
{ {
#if IDESCSI_DEBUG_LOG #if IDESCSI_DEBUG_LOG
printk (KERN_INFO "rq_status: %d, rq_dev: %u, cmd: %d, errors: %d\n",rq->rq_status,(unsigned int) rq->rq_dev,rq->cmd,rq->errors); printk (KERN_INFO "rq_status: %d, dev: %s, cmd: %d, errors: %d\n",rq->rq_status, rq->rq_disk->disk_name,rq->cmd,rq->errors);
printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %ld\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors); printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %ld\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors);
#endif /* IDESCSI_DEBUG_LOG */ #endif /* IDESCSI_DEBUG_LOG */
......
...@@ -2171,7 +2171,8 @@ static void scsi_dump_status(int level) ...@@ -2171,7 +2171,8 @@ static void scsi_dump_status(int level)
SCpnt->target, SCpnt->target,
SCpnt->lun, SCpnt->lun,
kdevname(SCpnt->request->rq_dev), SCpnt->request->rq_disk ?
SCpnt->request->rq_disk->disk_name : "?",
(unsigned long long)SCpnt->request->sector, (unsigned long long)SCpnt->request->sector,
SCpnt->request->nr_sectors, SCpnt->request->nr_sectors,
(long)SCpnt->request->current_nr_sectors, (long)SCpnt->request->current_nr_sectors,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment