diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:14:23 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:19 -0400 |
commit | 77dfce076cbd76c04e90abff188d058cdbff78dd (patch) | |
tree | c2f1ac2dd386c68e6bf8dee8d996d0b6e36f9c73 /drivers/scsi/scsi_debug.c | |
parent | 4679026d783eb5ac90247bc466d66b817b213abf (diff) |
scsi: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 6888b2ca5bfc..68da6c092f65 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -1778,7 +1778,7 @@ static int prot_verify_read(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1778 | scsi_for_each_prot_sg(SCpnt, psgl, scsi_prot_sg_count(SCpnt), i) { | 1778 | scsi_for_each_prot_sg(SCpnt, psgl, scsi_prot_sg_count(SCpnt), i) { |
1779 | int len = min(psgl->length, resid); | 1779 | int len = min(psgl->length, resid); |
1780 | 1780 | ||
1781 | paddr = kmap_atomic(sg_page(psgl), KM_IRQ0) + psgl->offset; | 1781 | paddr = kmap_atomic(sg_page(psgl)) + psgl->offset; |
1782 | memcpy(paddr, dif_storep + dif_offset(sector), len); | 1782 | memcpy(paddr, dif_storep + dif_offset(sector), len); |
1783 | 1783 | ||
1784 | sector += len >> 3; | 1784 | sector += len >> 3; |
@@ -1788,7 +1788,7 @@ static int prot_verify_read(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1788 | sector = do_div(tmp_sec, sdebug_store_sectors); | 1788 | sector = do_div(tmp_sec, sdebug_store_sectors); |
1789 | } | 1789 | } |
1790 | resid -= len; | 1790 | resid -= len; |
1791 | kunmap_atomic(paddr, KM_IRQ0); | 1791 | kunmap_atomic(paddr); |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | dix_reads++; | 1794 | dix_reads++; |
@@ -1881,12 +1881,12 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1881 | BUG_ON(scsi_sg_count(SCpnt) == 0); | 1881 | BUG_ON(scsi_sg_count(SCpnt) == 0); |
1882 | BUG_ON(scsi_prot_sg_count(SCpnt) == 0); | 1882 | BUG_ON(scsi_prot_sg_count(SCpnt) == 0); |
1883 | 1883 | ||
1884 | paddr = kmap_atomic(sg_page(psgl), KM_IRQ1) + psgl->offset; | 1884 | paddr = kmap_atomic(sg_page(psgl)) + psgl->offset; |
1885 | ppage_offset = 0; | 1885 | ppage_offset = 0; |
1886 | 1886 | ||
1887 | /* For each data page */ | 1887 | /* For each data page */ |
1888 | scsi_for_each_sg(SCpnt, dsgl, scsi_sg_count(SCpnt), i) { | 1888 | scsi_for_each_sg(SCpnt, dsgl, scsi_sg_count(SCpnt), i) { |
1889 | daddr = kmap_atomic(sg_page(dsgl), KM_IRQ0) + dsgl->offset; | 1889 | daddr = kmap_atomic(sg_page(dsgl)) + dsgl->offset; |
1890 | 1890 | ||
1891 | /* For each sector-sized chunk in data page */ | 1891 | /* For each sector-sized chunk in data page */ |
1892 | for (j = 0 ; j < dsgl->length ; j += scsi_debug_sector_size) { | 1892 | for (j = 0 ; j < dsgl->length ; j += scsi_debug_sector_size) { |
@@ -1895,10 +1895,10 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1895 | * protection page advance to the next one | 1895 | * protection page advance to the next one |
1896 | */ | 1896 | */ |
1897 | if (ppage_offset >= psgl->length) { | 1897 | if (ppage_offset >= psgl->length) { |
1898 | kunmap_atomic(paddr, KM_IRQ1); | 1898 | kunmap_atomic(paddr); |
1899 | psgl = sg_next(psgl); | 1899 | psgl = sg_next(psgl); |
1900 | BUG_ON(psgl == NULL); | 1900 | BUG_ON(psgl == NULL); |
1901 | paddr = kmap_atomic(sg_page(psgl), KM_IRQ1) | 1901 | paddr = kmap_atomic(sg_page(psgl)) |
1902 | + psgl->offset; | 1902 | + psgl->offset; |
1903 | ppage_offset = 0; | 1903 | ppage_offset = 0; |
1904 | } | 1904 | } |
@@ -1971,10 +1971,10 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1971 | ppage_offset += sizeof(struct sd_dif_tuple); | 1971 | ppage_offset += sizeof(struct sd_dif_tuple); |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | kunmap_atomic(daddr, KM_IRQ0); | 1974 | kunmap_atomic(daddr); |
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | kunmap_atomic(paddr, KM_IRQ1); | 1977 | kunmap_atomic(paddr); |
1978 | 1978 | ||
1979 | dix_writes++; | 1979 | dix_writes++; |
1980 | 1980 | ||
@@ -1982,8 +1982,8 @@ static int prot_verify_write(struct scsi_cmnd *SCpnt, sector_t start_sec, | |||
1982 | 1982 | ||
1983 | out: | 1983 | out: |
1984 | dif_errors++; | 1984 | dif_errors++; |
1985 | kunmap_atomic(daddr, KM_IRQ0); | 1985 | kunmap_atomic(daddr); |
1986 | kunmap_atomic(paddr, KM_IRQ1); | 1986 | kunmap_atomic(paddr); |
1987 | return ret; | 1987 | return ret; |
1988 | } | 1988 | } |
1989 | 1989 | ||
@@ -2303,7 +2303,7 @@ static int resp_xdwriteread(struct scsi_cmnd *scp, unsigned long long lba, | |||
2303 | 2303 | ||
2304 | offset = 0; | 2304 | offset = 0; |
2305 | for_each_sg(sdb->table.sgl, sg, sdb->table.nents, i) { | 2305 | for_each_sg(sdb->table.sgl, sg, sdb->table.nents, i) { |
2306 | kaddr = (unsigned char *)kmap_atomic(sg_page(sg), KM_USER0); | 2306 | kaddr = (unsigned char *)kmap_atomic(sg_page(sg)); |
2307 | if (!kaddr) | 2307 | if (!kaddr) |
2308 | goto out; | 2308 | goto out; |
2309 | 2309 | ||
@@ -2311,7 +2311,7 @@ static int resp_xdwriteread(struct scsi_cmnd *scp, unsigned long long lba, | |||
2311 | *(kaddr + sg->offset + j) ^= *(buf + offset + j); | 2311 | *(kaddr + sg->offset + j) ^= *(buf + offset + j); |
2312 | 2312 | ||
2313 | offset += sg->length; | 2313 | offset += sg->length; |
2314 | kunmap_atomic(kaddr, KM_USER0); | 2314 | kunmap_atomic(kaddr); |
2315 | } | 2315 | } |
2316 | ret = 0; | 2316 | ret = 0; |
2317 | out: | 2317 | out: |