Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
ide-dma: don't reset request fields on dma_timeout_retry()
Browse files Browse the repository at this point in the history
Impact: drop unnecessary code

Now that everything uses bio and block operations, there is no need to
reset request fields manually when retrying a request.  Every field is
guaranteed to be always valid.  Drop unnecessary request field
resetting from ide_dma_timeout_retry().

Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
htejun authored and Jens Axboe committed Apr 28, 2009
1 parent 5ad960f commit 586cf26
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,23 +510,11 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
/*
* un-busy drive etc and make sure request is sane
*/

rq = hwif->rq;
if (!rq)
goto out;

hwif->rq = NULL;

rq->errors = 0;

if (!rq->bio)
goto out;

rq->sector = rq->bio->bi_sector;
rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9;
rq->hard_cur_sectors = rq->current_nr_sectors;
rq->buffer = bio_data(rq->bio);
out:
if (rq) {
hwif->rq = NULL;
rq->errors = 0;
}
return ret;
}

Expand Down

0 comments on commit 586cf26

Please sign in to comment.