aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd_dif.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 12:40:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 12:40:26 -0400
commit9f3938346a5c1fa504647670edb5fea5756cfb00 (patch)
tree7cf6d24d6b076c8db8571494984924cac03703a2 /drivers/scsi/sd_dif.c
parent69a7aebcf019ab3ff5764525ad6858fbe23bb86d (diff)
parent317b6e128247f75976b0fc2b9fd8d2c20ef13b3a (diff)
Merge branch 'kmap_atomic' of git://github.com/congwang/linux
Pull kmap_atomic cleanup from Cong Wang. It's been in -next for a long time, and it gets rid of the (no longer used) second argument to k[un]map_atomic(). Fix up a few trivial conflicts in various drivers, and do an "evil merge" to catch some new uses that have come in since Cong's tree. * 'kmap_atomic' of git://github.com/congwang/linux: (59 commits) feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename] drbd: remove the second argument of k[un]map_atomic() zcache: remove the second argument of k[un]map_atomic() gma500: remove the second argument of k[un]map_atomic() dm: remove the second argument of k[un]map_atomic() tomoyo: remove the second argument of k[un]map_atomic() sunrpc: remove the second argument of k[un]map_atomic() rds: remove the second argument of k[un]map_atomic() net: remove the second argument of k[un]map_atomic() mm: remove the second argument of k[un]map_atomic() lib: remove the second argument of k[un]map_atomic() power: remove the second argument of k[un]map_atomic() kdb: remove the second argument of k[un]map_atomic() udf: remove the second argument of k[un]map_atomic() ubifs: remove the second argument of k[un]map_atomic() squashfs: remove the second argument of k[un]map_atomic() reiserfs: remove the second argument of k[un]map_atomic() ocfs2: remove the second argument of k[un]map_atomic() ntfs: remove the second argument of k[un]map_atomic() ...
Diffstat (limited to 'drivers/scsi/sd_dif.c')
-rw-r--r--drivers/scsi/sd_dif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
index f8fb2d691c0a..e52d5bc42bc4 100644
--- a/drivers/scsi/sd_dif.c
+++ b/drivers/scsi/sd_dif.c
@@ -392,7 +392,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s
392 virt = bio->bi_integrity->bip_sector & 0xffffffff; 392 virt = bio->bi_integrity->bip_sector & 0xffffffff;
393 393
394 bip_for_each_vec(iv, bio->bi_integrity, i) { 394 bip_for_each_vec(iv, bio->bi_integrity, i) {
395 sdt = kmap_atomic(iv->bv_page, KM_USER0) 395 sdt = kmap_atomic(iv->bv_page)
396 + iv->bv_offset; 396 + iv->bv_offset;
397 397
398 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) { 398 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) {
@@ -405,7 +405,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s
405 phys++; 405 phys++;
406 } 406 }
407 407
408 kunmap_atomic(sdt, KM_USER0); 408 kunmap_atomic(sdt);
409 } 409 }
410 410
411 bio->bi_flags |= (1 << BIO_MAPPED_INTEGRITY); 411 bio->bi_flags |= (1 << BIO_MAPPED_INTEGRITY);
@@ -414,7 +414,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s
414 return 0; 414 return 0;
415 415
416error: 416error:
417 kunmap_atomic(sdt, KM_USER0); 417 kunmap_atomic(sdt);
418 sd_printk(KERN_ERR, sdkp, "%s: virt %u, phys %u, ref %u, app %4x\n", 418 sd_printk(KERN_ERR, sdkp, "%s: virt %u, phys %u, ref %u, app %4x\n",
419 __func__, virt, phys, be32_to_cpu(sdt->ref_tag), 419 __func__, virt, phys, be32_to_cpu(sdt->ref_tag),
420 be16_to_cpu(sdt->app_tag)); 420 be16_to_cpu(sdt->app_tag));
@@ -453,13 +453,13 @@ void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes)
453 virt = bio->bi_integrity->bip_sector & 0xffffffff; 453 virt = bio->bi_integrity->bip_sector & 0xffffffff;
454 454
455 bip_for_each_vec(iv, bio->bi_integrity, i) { 455 bip_for_each_vec(iv, bio->bi_integrity, i) {
456 sdt = kmap_atomic(iv->bv_page, KM_USER0) 456 sdt = kmap_atomic(iv->bv_page)
457 + iv->bv_offset; 457 + iv->bv_offset;
458 458
459 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) { 459 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) {
460 460
461 if (sectors == 0) { 461 if (sectors == 0) {
462 kunmap_atomic(sdt, KM_USER0); 462 kunmap_atomic(sdt);
463 return; 463 return;
464 } 464 }
465 465
@@ -474,7 +474,7 @@ void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes)
474 sectors--; 474 sectors--;
475 } 475 }
476 476
477 kunmap_atomic(sdt, KM_USER0); 477 kunmap_atomic(sdt);
478 } 478 }
479 } 479 }
480} 480}