diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-02-27 21:56:27 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-09 23:47:18 -0500 |
commit | 5cfb5b0258a08cc76822343af648604713d7d995 (patch) | |
tree | 269ca66b928ed37a0493b52b4189d0c412f547ba /drivers | |
parent | 2c958a8c1f15f56a528769f4e1402e33e7a4b90e (diff) | |
download | lwn-5cfb5b0258a08cc76822343af648604713d7d995.tar.gz lwn-5cfb5b0258a08cc76822343af648604713d7d995.zip |
scsi: target: core: Get rid of warning in compare_and_write_do_cmp()
Rename function local variable i to sg_cnt so we can get rid of the
shadow variable compilation warning:
unsigned int i;
^
int i;
^
Link: https://lore.kernel.org/r/20210228055645.22253-6-chaitanya.kulkarni@wdc.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_sbc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index f7c527a826fd..7b07e557dc8d 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -448,7 +448,7 @@ compare_and_write_do_cmp(struct scatterlist *read_sgl, unsigned int read_nents, sense_reason_t ret; unsigned int offset; size_t rc; - int i; + int sg_cnt; buf = kzalloc(cmp_len, GFP_KERNEL); if (!buf) { @@ -467,7 +467,7 @@ compare_and_write_do_cmp(struct scatterlist *read_sgl, unsigned int read_nents, */ offset = 0; ret = TCM_NO_SENSE; - for_each_sg(read_sgl, sg, read_nents, i) { + for_each_sg(read_sgl, sg, read_nents, sg_cnt) { unsigned int len = min(sg->length, cmp_len); unsigned char *addr = kmap_atomic(sg_page(sg)); |