Commit 6c92e699 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

Fixup rq_for_each_segment() indentation

Remove one level of nesting where appropriate.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent bc1c56fd
...@@ -216,13 +216,11 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req) ...@@ -216,13 +216,11 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req)
if (!rq_iter_last(req, iter)) if (!rq_iter_last(req, iter))
flags = MSG_MORE; flags = MSG_MORE;
dprintk(DBG_TX, "%s: request %p: sending %d bytes data\n", dprintk(DBG_TX, "%s: request %p: sending %d bytes data\n",
lo->disk->disk_name, req, lo->disk->disk_name, req, bvec->bv_len);
bvec->bv_len);
result = sock_send_bvec(sock, bvec, flags); result = sock_send_bvec(sock, bvec, flags);
if (result <= 0) { if (result <= 0) {
printk(KERN_ERR "%s: Send data failed (result %d)\n", printk(KERN_ERR "%s: Send data failed (result %d)\n",
lo->disk->disk_name, lo->disk->disk_name, result);
result);
goto error_out; goto error_out;
} }
} }
...@@ -326,8 +324,7 @@ static struct request *nbd_read_stat(struct nbd_device *lo) ...@@ -326,8 +324,7 @@ static struct request *nbd_read_stat(struct nbd_device *lo)
result = sock_recv_bvec(sock, bvec); result = sock_recv_bvec(sock, bvec);
if (result <= 0) { if (result <= 0) {
printk(KERN_ERR "%s: Receive data failed (result %d)\n", printk(KERN_ERR "%s: Receive data failed (result %d)\n",
lo->disk->disk_name, lo->disk->disk_name, result);
result);
req->errors++; req->errors++;
return req; return req;
} }
......
...@@ -114,7 +114,6 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev, ...@@ -114,7 +114,6 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
offset += size; offset += size;
flush_kernel_dcache_page(bvec->bv_page); flush_kernel_dcache_page(bvec->bv_page);
bvec_kunmap_irq(bvec, &flags); bvec_kunmap_irq(bvec, &flags);
i++; i++;
} }
} }
......
...@@ -186,8 +186,7 @@ static int blkif_queue_request(struct request *req) ...@@ -186,8 +186,7 @@ static int blkif_queue_request(struct request *req)
ring_req->nr_segments = 0; ring_req->nr_segments = 0;
rq_for_each_segment(bvec, req, iter) { rq_for_each_segment(bvec, req, iter) {
BUG_ON(ring_req->nr_segments BUG_ON(ring_req->nr_segments == BLKIF_MAX_SEGMENTS_PER_REQUEST);
== BLKIF_MAX_SEGMENTS_PER_REQUEST);
buffer_mfn = pfn_to_mfn(page_to_pfn(bvec->bv_page)); buffer_mfn = pfn_to_mfn(page_to_pfn(bvec->bv_page));
fsect = bvec->bv_offset >> 9; fsect = bvec->bv_offset >> 9;
lsect = fsect + (bvec->bv_len >> 9) - 1; lsect = fsect + (bvec->bv_len >> 9) - 1;
......
...@@ -1211,8 +1211,7 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req) ...@@ -1211,8 +1211,7 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
count += bv->bv_len >> (device->s2b_shift + 9); count += bv->bv_len >> (device->s2b_shift + 9);
#if defined(CONFIG_64BIT) #if defined(CONFIG_64BIT)
if (idal_is_needed (page_address(bv->bv_page), if (idal_is_needed (page_address(bv->bv_page), bv->bv_len))
bv->bv_len))
cidaw += bv->bv_len >> (device->s2b_shift + 9); cidaw += bv->bv_len >> (device->s2b_shift + 9);
#endif #endif
} }
......
...@@ -262,8 +262,7 @@ dasd_fba_build_cp(struct dasd_device * device, struct request *req) ...@@ -262,8 +262,7 @@ dasd_fba_build_cp(struct dasd_device * device, struct request *req)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
count += bv->bv_len >> (device->s2b_shift + 9); count += bv->bv_len >> (device->s2b_shift + 9);
#if defined(CONFIG_64BIT) #if defined(CONFIG_64BIT)
if (idal_is_needed (page_address(bv->bv_page), if (idal_is_needed (page_address(bv->bv_page), bv->bv_len))
bv->bv_len))
cidaw += bv->bv_len / blksize; cidaw += bv->bv_len / blksize;
#endif #endif
} }
......
...@@ -1174,8 +1174,7 @@ tape_34xx_bread(struct tape_device *device, struct request *req) ...@@ -1174,8 +1174,7 @@ tape_34xx_bread(struct tape_device *device, struct request *req)
rq_for_each_segment(bv, req, iter) { rq_for_each_segment(bv, req, iter) {
dst = kmap(bv->bv_page) + bv->bv_offset; dst = kmap(bv->bv_page) + bv->bv_offset;
for (off = 0; off < bv->bv_len; for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) {
off += TAPEBLOCK_HSEC_SIZE) {
ccw->flags = CCW_FLAG_CC; ccw->flags = CCW_FLAG_CC;
ccw->cmd_code = READ_FORWARD; ccw->cmd_code = READ_FORWARD;
ccw->count = TAPEBLOCK_HSEC_SIZE; ccw->count = TAPEBLOCK_HSEC_SIZE;
......
...@@ -653,8 +653,7 @@ tape_3590_bread(struct tape_device *device, struct request *req) ...@@ -653,8 +653,7 @@ tape_3590_bread(struct tape_device *device, struct request *req)
rq_for_each_segment(bv, req, iter) { rq_for_each_segment(bv, req, iter) {
dst = page_address(bv->bv_page) + bv->bv_offset; dst = page_address(bv->bv_page) + bv->bv_offset;
for (off = 0; off < bv->bv_len; for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) {
off += TAPEBLOCK_HSEC_SIZE) {
ccw->flags = CCW_FLAG_CC; ccw->flags = CCW_FLAG_CC;
ccw->cmd_code = READ_FORWARD; ccw->cmd_code = READ_FORWARD;
ccw->count = TAPEBLOCK_HSEC_SIZE; ccw->count = TAPEBLOCK_HSEC_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment