ide: ide-atapi: fix compile error with defining macro DEBUG
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 10 Nov 2017 07:59:17 +0000 (15:59 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:56:25 +0000 (19:56 -0700)
Compile ide-atapi failed with defining macro "DEBUG"
...
|drivers/ide/ide-atapi.c:285:52: error: 'struct request' has
no member named 'cmd'; did you mean 'csd'?
|  debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]);
...

Since we split the scsi_request out of struct request, it missed
do the same thing on debug_log

Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request")
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ide/ide-atapi.c

index 14d1e7d9a1d6f7d0bf5b966c233ae32cdb5d598d..0e6bc631a1caf6d24928614ec1fc8b17ea4096bc 100644 (file)
@@ -282,7 +282,7 @@ int ide_cd_expiry(ide_drive_t *drive)
        struct request *rq = drive->hwif->rq;
        unsigned long wait = 0;
 
-       debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]);
+       debug_log("%s: scsi_req(rq)->cmd[0]: 0x%x\n", __func__, scsi_req(rq)->cmd[0]);
 
        /*
         * Some commands are *slow* and normally take a long time to complete.
@@ -463,7 +463,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
                                return ide_do_reset(drive);
                        }
 
-                       debug_log("[cmd %x]: check condition\n", rq->cmd[0]);
+                       debug_log("[cmd %x]: check condition\n", scsi_req(rq)->cmd[0]);
 
                        /* Retry operation */
                        ide_retry_pc(drive);
@@ -531,7 +531,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
                ide_pad_transfer(drive, write, bcount);
 
        debug_log("[cmd %x] transferred %d bytes, padded %d bytes, resid: %u\n",
-                 rq->cmd[0], done, bcount, scsi_req(rq)->resid_len);
+                 scsi_req(rq)->cmd[0], done, bcount, scsi_req(rq)->resid_len);
 
        /* And set the interrupt handler again */
        ide_set_handler(drive, ide_pc_intr, timeout);