summaryrefslogtreecommitdiffstats
path: root/drivers/block/amiflop.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-28 13:06:06 +0900
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 08:14:50 +0200
commit5b5c5d12b91cb6b2a2967f06aef35d59008dc2e7 (patch)
treeea8397d10aaedda61fcc849ce9a7fcab17b5438b /drivers/block/amiflop.c
parent4c94dece1baf320d925cedb231489c4e0358ac5a (diff)
downloadlinux-5b5c5d12b91cb6b2a2967f06aef35d59008dc2e7.tar.gz
linux-5b5c5d12b91cb6b2a2967f06aef35d59008dc2e7.tar.bz2
linux-5b5c5d12b91cb6b2a2967f06aef35d59008dc2e7.zip
amiflop,ataflop,xd,mg_disk: clean up unnecessary stuff from block drivers
rq_data_dir() can only be READ or WRITE and rq->sector and nr_sectors are always automatically updated after partial request completion. Don't worry about rq_data_dir() not being either READ or WRITE or manually update sector and nr_sectors. [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jörg Dorchain <joerg@dorchain.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: unsik Kim <donari75@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/amiflop.c')
-rw-r--r--drivers/block/amiflop.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index b99a2a606d02..8ff95f2c0ede 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1371,11 +1371,6 @@ static void redo_fd_request(void)
"0x%08lx\n", track, sector, data);
#endif
- if ((rq_data_dir(CURRENT) != READ) && (rq_data_dir(CURRENT) != WRITE)) {
- printk(KERN_WARNING "do_fd_request: unknown command\n");
- __blk_end_request_cur(CURRENT, -EIO);
- goto repeat;
- }
if (get_track(drive, track) == -1) {
__blk_end_request_cur(CURRENT, -EIO);
goto repeat;
@@ -1407,8 +1402,6 @@ static void redo_fd_request(void)
break;
}
}
- CURRENT->nr_sectors -= CURRENT->current_nr_sectors;
- CURRENT->sector += CURRENT->current_nr_sectors;
__blk_end_request_cur(CURRENT, 0);
goto repeat;