From: Tejun Heo <tj@kernel.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: petkovbb@googlemail.com, axboe@kernel.dk, linux-ide@vger.kernel.org
Subject: [PATCH #ide-phase2] ide-dma: don't reset request fields on dma_timeout_retry()
Date: Tue, 21 Apr 2009 12:23:16 +0900 [thread overview]
Message-ID: <49ED3C24.4010709@kernel.org> (raw)
In-Reply-To: <200904201357.44507.bzolnier@gmail.com>
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>
---
This patch applies on top of this patchset. I updated the #ide-phase2
git branch to include this patch. Thanks.
drivers/ide/ide-dma.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
Index: block/drivers/ide/ide-dma.c
===================================================================
--- block.orig/drivers/ide/ide-dma.c
+++ block/drivers/ide/ide-dma.c
@@ -510,23 +510,11 @@ ide_startstop_t ide_dma_timeout_retry(id
/*
* 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;
}
next prev parent reply other threads:[~2009-04-21 3:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 23:58 [GIT PATCH pata-2.6] ide: clean up ide-tape, take#2 Tejun Heo
2009-04-18 23:58 ` [PATCH 01/10] ide-tape,floppy: fix failed command completion after request sense Tejun Heo
2009-04-18 23:58 ` [PATCH 02/10] ide-atapi,tape,floppy: allow ->pc_callback() to change rq->data_len Tejun Heo
2009-04-18 23:58 ` [PATCH 03/10] ide-tape: use single continuous buffer Tejun Heo
2009-04-18 23:58 ` [PATCH 04/10] ide-tape: use standard data transfer mechanism Tejun Heo
2009-04-18 23:58 ` [PATCH 05/10] ide-tape: kill idetape_bh Tejun Heo
2009-04-18 23:58 ` [PATCH 06/10] ide-tape: unify r/w init paths Tejun Heo
2009-04-20 13:20 ` Sergei Shtylyov
2009-04-18 23:58 ` [PATCH 07/10] ide-tape: use byte size instead of sectors on rw issue functions Tejun Heo
2009-04-20 13:39 ` Sergei Shtylyov
2009-04-18 23:58 ` [PATCH 08/10] ide-tape: simplify read/write functions Tejun Heo
2009-04-18 23:58 ` [PATCH 09/10] ide-atapi: kill unused fields and callbacks Tejun Heo
2009-04-18 23:58 ` [PATCH 10/10] ide: drop rq->data handling from ide_map_sg() Tejun Heo
2009-04-20 11:57 ` [GIT PATCH pata-2.6] ide: clean up ide-tape, take#2 Bartlomiej Zolnierkiewicz
2009-04-21 3:23 ` Tejun Heo [this message]
2009-04-21 11:53 ` [PATCH #ide-phase2] ide-dma: don't reset request fields on dma_timeout_retry() Bartlomiej Zolnierkiewicz
2009-04-21 16:34 ` Tejun Heo
2009-04-21 5:09 ` [GIT PATCH pata-2.6] ide: clean up ide-tape, take#2 Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49ED3C24.4010709@kernel.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=petkovbb@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).