aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-08-16 07:43:12 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:25:56 -0400
commit6c92e699b56287da582ccb12a64b959b6d6109ba (patch)
treeac8c9f26640ff8b35cd96f8222f8ce84ba2c53e5 /drivers/s390
parentbc1c56fde6dd1c85e2047c276456c07bd4508b5c (diff)
Fixup rq_for_each_segment() indentation
Remove one level of nesting where appropriate. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_diag.c28
-rw-r--r--drivers/s390/block/dasd_eckd.c13
-rw-r--r--drivers/s390/block/dasd_fba.c13
-rw-r--r--drivers/s390/char/tape_34xx.c19
-rw-r--r--drivers/s390/char/tape_3590.c23
5 files changed, 46 insertions, 50 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 6bb9676f203e..571320ab9e1a 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -493,10 +493,10 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req)
493 /* Check struct bio and count the number of blocks for the request. */ 493 /* Check struct bio and count the number of blocks for the request. */
494 count = 0; 494 count = 0;
495 rq_for_each_segment(bv, req, iter) { 495 rq_for_each_segment(bv, req, iter) {
496 if (bv->bv_len & (blksize - 1)) 496 if (bv->bv_len & (blksize - 1))
497 /* Fba can only do full blocks. */ 497 /* Fba can only do full blocks. */
498 return ERR_PTR(-EINVAL); 498 return ERR_PTR(-EINVAL);
499 count += bv->bv_len >> (device->s2b_shift + 9); 499 count += bv->bv_len >> (device->s2b_shift + 9);
500 } 500 }
501 /* Paranoia. */ 501 /* Paranoia. */
502 if (count != last_rec - first_rec + 1) 502 if (count != last_rec - first_rec + 1)
@@ -514,16 +514,16 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req)
514 dbio = dreq->bio; 514 dbio = dreq->bio;
515 recid = first_rec; 515 recid = first_rec;
516 rq_for_each_segment(bv, req, iter) { 516 rq_for_each_segment(bv, req, iter) {
517 dst = page_address(bv->bv_page) + bv->bv_offset; 517 dst = page_address(bv->bv_page) + bv->bv_offset;
518 for (off = 0; off < bv->bv_len; off += blksize) { 518 for (off = 0; off < bv->bv_len; off += blksize) {
519 memset(dbio, 0, sizeof (struct dasd_diag_bio)); 519 memset(dbio, 0, sizeof (struct dasd_diag_bio));
520 dbio->type = rw_cmd; 520 dbio->type = rw_cmd;
521 dbio->block_number = recid + 1; 521 dbio->block_number = recid + 1;
522 dbio->buffer = dst; 522 dbio->buffer = dst;
523 dbio++; 523 dbio++;
524 dst += blksize; 524 dst += blksize;
525 recid++; 525 recid++;
526 } 526 }
527 } 527 }
528 cqr->retries = DIAG_MAX_RETRIES; 528 cqr->retries = DIAG_MAX_RETRIES;
529 cqr->buildclk = get_clock(); 529 cqr->buildclk = get_clock();
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 36ba45849874..44adf8496bda 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1206,14 +1206,13 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req)
1206 count = 0; 1206 count = 0;
1207 cidaw = 0; 1207 cidaw = 0;
1208 rq_for_each_segment(bv, req, iter) { 1208 rq_for_each_segment(bv, req, iter) {
1209 if (bv->bv_len & (blksize - 1)) 1209 if (bv->bv_len & (blksize - 1))
1210 /* Eckd can only do full blocks. */ 1210 /* Eckd can only do full blocks. */
1211 return ERR_PTR(-EINVAL); 1211 return ERR_PTR(-EINVAL);
1212 count += bv->bv_len >> (device->s2b_shift + 9); 1212 count += bv->bv_len >> (device->s2b_shift + 9);
1213#if defined(CONFIG_64BIT) 1213#if defined(CONFIG_64BIT)
1214 if (idal_is_needed (page_address(bv->bv_page), 1214 if (idal_is_needed (page_address(bv->bv_page), bv->bv_len))
1215 bv->bv_len)) 1215 cidaw += bv->bv_len >> (device->s2b_shift + 9);
1216 cidaw += bv->bv_len >> (device->s2b_shift + 9);
1217#endif 1216#endif
1218 } 1217 }
1219 /* Paranoia. */ 1218 /* Paranoia. */
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 119b8d2d5f17..1d95822e0b8e 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -257,14 +257,13 @@ dasd_fba_build_cp(struct dasd_device * device, struct request *req)
257 count = 0; 257 count = 0;
258 cidaw = 0; 258 cidaw = 0;
259 rq_for_each_segment(bv, req, iter) { 259 rq_for_each_segment(bv, req, iter) {
260 if (bv->bv_len & (blksize - 1)) 260 if (bv->bv_len & (blksize - 1))
261 /* Fba can only do full blocks. */ 261 /* Fba can only do full blocks. */
262 return ERR_PTR(-EINVAL); 262 return ERR_PTR(-EINVAL);
263 count += bv->bv_len >> (device->s2b_shift + 9); 263 count += bv->bv_len >> (device->s2b_shift + 9);
264#if defined(CONFIG_64BIT) 264#if defined(CONFIG_64BIT)
265 if (idal_is_needed (page_address(bv->bv_page), 265 if (idal_is_needed (page_address(bv->bv_page), bv->bv_len))
266 bv->bv_len)) 266 cidaw += bv->bv_len / blksize;
267 cidaw += bv->bv_len / blksize;
268#endif 267#endif
269 } 268 }
270 /* Paranoia. */ 269 /* Paranoia. */
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index ea3e6a345c89..5b47e9cce75f 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -1173,16 +1173,15 @@ tape_34xx_bread(struct tape_device *device, struct request *req)
1173 ccw = tape_ccw_cc(ccw, NOP, 0, NULL); 1173 ccw = tape_ccw_cc(ccw, NOP, 0, NULL);
1174 1174
1175 rq_for_each_segment(bv, req, iter) { 1175 rq_for_each_segment(bv, req, iter) {
1176 dst = kmap(bv->bv_page) + bv->bv_offset; 1176 dst = kmap(bv->bv_page) + bv->bv_offset;
1177 for (off = 0; off < bv->bv_len; 1177 for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) {
1178 off += TAPEBLOCK_HSEC_SIZE) { 1178 ccw->flags = CCW_FLAG_CC;
1179 ccw->flags = CCW_FLAG_CC; 1179 ccw->cmd_code = READ_FORWARD;
1180 ccw->cmd_code = READ_FORWARD; 1180 ccw->count = TAPEBLOCK_HSEC_SIZE;
1181 ccw->count = TAPEBLOCK_HSEC_SIZE; 1181 set_normalized_cda(ccw, (void*) __pa(dst));
1182 set_normalized_cda(ccw, (void*) __pa(dst)); 1182 ccw++;
1183 ccw++; 1183 dst += TAPEBLOCK_HSEC_SIZE;
1184 dst += TAPEBLOCK_HSEC_SIZE; 1184 }
1185 }
1186 } 1185 }
1187 1186
1188 ccw = tape_ccw_end(ccw, NOP, 0, NULL); 1187 ccw = tape_ccw_end(ccw, NOP, 0, NULL);
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index b16ad7a7631d..9f244c591eeb 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -652,18 +652,17 @@ tape_3590_bread(struct tape_device *device, struct request *req)
652 ccw = tape_ccw_cc(ccw, NOP, 0, NULL); 652 ccw = tape_ccw_cc(ccw, NOP, 0, NULL);
653 653
654 rq_for_each_segment(bv, req, iter) { 654 rq_for_each_segment(bv, req, iter) {
655 dst = page_address(bv->bv_page) + bv->bv_offset; 655 dst = page_address(bv->bv_page) + bv->bv_offset;
656 for (off = 0; off < bv->bv_len; 656 for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) {
657 off += TAPEBLOCK_HSEC_SIZE) { 657 ccw->flags = CCW_FLAG_CC;
658 ccw->flags = CCW_FLAG_CC; 658 ccw->cmd_code = READ_FORWARD;
659 ccw->cmd_code = READ_FORWARD; 659 ccw->count = TAPEBLOCK_HSEC_SIZE;
660 ccw->count = TAPEBLOCK_HSEC_SIZE; 660 set_normalized_cda(ccw, (void *) __pa(dst));
661 set_normalized_cda(ccw, (void *) __pa(dst)); 661 ccw++;
662 ccw++; 662 dst += TAPEBLOCK_HSEC_SIZE;
663 dst += TAPEBLOCK_HSEC_SIZE; 663 }
664 } 664 if (off > bv->bv_len)
665 if (off > bv->bv_len) 665 BUG();
666 BUG();
667 } 666 }
668 ccw = tape_ccw_end(ccw, NOP, 0, NULL); 667 ccw = tape_ccw_end(ccw, NOP, 0, NULL);
669 DBF_EVENT(6, "xBREDccwg\n"); 668 DBF_EVENT(6, "xBREDccwg\n");