aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-07 09:24:45 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 03:50:55 -0400
commit1011c1b9f2e45ce7c6e38888d2b83936aec38771 (patch)
tree63f1f8f604631f37df9917a941531de0148f8379 /drivers/memstick
parenta2dec7b36364a5cc564c4d76cf16d2e7d33f5c05 (diff)
block: blk_rq_[cur_]_{sectors|bytes}() usage cleanup
With the previous changes, the followings are now guaranteed for all requests in any valid state. * blk_rq_sectors() == blk_rq_bytes() >> 9 * blk_rq_cur_sectors() == blk_rq_cur_bytes() >> 9 Clean up accessor usages. Notable changes are * nbd,i2o_block: end_all used instead of explicit byte count * scsi_lib: unnecessary conditional on request type removed [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/mspro_block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index 9e600d22f40e..93b2c6185656 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -680,7 +680,7 @@ try_again:
680 t_sec = blk_rq_pos(msb->block_req) << 9; 680 t_sec = blk_rq_pos(msb->block_req) << 9;
681 sector_div(t_sec, msb->page_size); 681 sector_div(t_sec, msb->page_size);
682 682
683 count = blk_rq_sectors(msb->block_req) << 9; 683 count = blk_rq_bytes(msb->block_req);
684 count /= msb->page_size; 684 count /= msb->page_size;
685 685
686 param.system = msb->system; 686 param.system = msb->system;
@@ -745,7 +745,7 @@ static int mspro_block_complete_req(struct memstick_dev *card, int error)
745 t_len *= msb->page_size; 745 t_len *= msb->page_size;
746 } 746 }
747 } else 747 } else
748 t_len = blk_rq_sectors(msb->block_req) << 9; 748 t_len = blk_rq_bytes(msb->block_req);
749 749
750 dev_dbg(&card->dev, "transferred %x (%d)\n", t_len, error); 750 dev_dbg(&card->dev, "transferred %x (%d)\n", t_len, error);
751 751