diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-01-07 00:45:55 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-01-11 14:32:44 +0100 |
commit | 7af92f8754b87bc78cbfd447d5f4096b25c46682 (patch) | |
tree | c165aba0edf277d5d2a4865641705365c14dd726 | |
parent | block: removed unused as_io_context (diff) | |
download | linux-7af92f8754b87bc78cbfd447d5f4096b25c46682.tar.xz linux-7af92f8754b87bc78cbfd447d5f4096b25c46682.zip |
genhd: overlapping variable definition
This fixes the sparse warning:
fs/ext4/super.c:2390:40: warning: symbol 'i' shadows an earlier one
fs/ext4/super.c:2368:22: originally declared here
Using 'i' in a macro is dubious practice.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | include/linux/genhd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index c6c0c41af35f..9717081c75ad 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -256,9 +256,9 @@ extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, #define part_stat_read(part, field) \ ({ \ typeof((part)->dkstats->field) res = 0; \ - int i; \ - for_each_possible_cpu(i) \ - res += per_cpu_ptr((part)->dkstats, i)->field; \ + unsigned int _cpu; \ + for_each_possible_cpu(_cpu) \ + res += per_cpu_ptr((part)->dkstats, _cpu)->field; \ res; \ }) |