diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:42 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:55 -0400 |
commit | b0790410300abaaf4f25f702803beff701baebf1 (patch) | |
tree | 63d8fcd38e4cd5927fd83e482e306480bb68a689 /drivers/scsi/libsas/sas_expander.c | |
parent | 2e46e8b27aa57c6bd34b3102b40ee4d0144b4fab (diff) |
block: cleanup rq->data_len usages
With recent unification of fields, it's now guaranteed that
rq->data_len always equals blk_rq_bytes(). Convert all non-IDE direct
users to accessors. IDE will be converted in a separate patch.
Boaz: spotted incorrect data_len/resid_len conversion in osd.
[ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 6605ec905cc0..531af9ed7199 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -1927,13 +1927,13 @@ int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1927 | /* do we need to support multiple segments? */ | 1927 | /* do we need to support multiple segments? */ |
1928 | if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) { | 1928 | if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) { |
1929 | printk("%s: multiple segments req %u %u, rsp %u %u\n", | 1929 | printk("%s: multiple segments req %u %u, rsp %u %u\n", |
1930 | __func__, req->bio->bi_vcnt, req->data_len, | 1930 | __func__, req->bio->bi_vcnt, blk_rq_bytes(req), |
1931 | rsp->bio->bi_vcnt, rsp->data_len); | 1931 | rsp->bio->bi_vcnt, blk_rq_bytes(rsp)); |
1932 | return -EINVAL; | 1932 | return -EINVAL; |
1933 | } | 1933 | } |
1934 | 1934 | ||
1935 | ret = smp_execute_task(dev, bio_data(req->bio), req->data_len, | 1935 | ret = smp_execute_task(dev, bio_data(req->bio), blk_rq_bytes(req), |
1936 | bio_data(rsp->bio), rsp->data_len); | 1936 | bio_data(rsp->bio), blk_rq_bytes(rsp)); |
1937 | if (ret > 0) { | 1937 | if (ret > 0) { |
1938 | /* positive number is the untransferred residual */ | 1938 | /* positive number is the untransferred residual */ |
1939 | rsp->resid_len = ret; | 1939 | rsp->resid_len = ret; |