Skip to content

Commit cbfd082

Browse files
committed
ide-cd: don't abuse rq->buffer
Impact: rq->buffer usage cleanup ide-cd uses rq->buffer to carry pointer to the original request when issuing REQUEST_SENSE. Use rq->special instead. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jens Axboe <axboe@kernel.dk>
1 parent c267cc1 commit cbfd082

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/ide/ide-cd.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
232232
rq->cmd_type = REQ_TYPE_SENSE;
233233
rq->cmd_flags |= REQ_PREEMPT;
234234

235-
/* NOTE! Save the failed command in "rq->buffer" */
236-
rq->buffer = (void *) failed_command;
235+
/* NOTE! Save the failed command in "rq->special" */
236+
rq->special = (void *)failed_command;
237237

238238
if (failed_command)
239239
ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x",
@@ -247,10 +247,10 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
247247
static void ide_cd_complete_failed_rq(ide_drive_t *drive, struct request *rq)
248248
{
249249
/*
250-
* For REQ_TYPE_SENSE, "rq->buffer" points to the original
250+
* For REQ_TYPE_SENSE, "rq->special" points to the original
251251
* failed request
252252
*/
253-
struct request *failed = (struct request *)rq->buffer;
253+
struct request *failed = (struct request *)rq->special;
254254
struct cdrom_info *info = drive->driver_data;
255255
void *sense = &info->sense_data;
256256

0 commit comments

Comments
 (0)