Commit 306fbc2e authored by Tom Rix's avatar Tom Rix Committed by Mike Snitzer

dm raid: remove unused d variable

clang with W=1 reports
drivers/md/dm-raid.c:2212:15: error: variable
  'd' set but not used [-Werror,-Wunused-but-set-variable]
        unsigned int d;
                     ^
This variable is not used so remove it.
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent 26cb62a2
...@@ -2209,7 +2209,6 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev) ...@@ -2209,7 +2209,6 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev)
static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
{ {
int role; int role;
unsigned int d;
struct mddev *mddev = &rs->md; struct mddev *mddev = &rs->md;
uint64_t events_sb; uint64_t events_sb;
uint64_t failed_devices[DISKS_ARRAY_ELEMS]; uint64_t failed_devices[DISKS_ARRAY_ELEMS];
...@@ -2324,7 +2323,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) ...@@ -2324,7 +2323,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
* to provide capacity for redundancy or during reshape * to provide capacity for redundancy or during reshape
* to add capacity to grow the raid set. * to add capacity to grow the raid set.
*/ */
d = 0;
rdev_for_each(r, mddev) { rdev_for_each(r, mddev) {
if (test_bit(Journal, &rdev->flags)) if (test_bit(Journal, &rdev->flags))
continue; continue;
...@@ -2340,8 +2338,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) ...@@ -2340,8 +2338,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
if (test_bit(FirstUse, &r->flags)) if (test_bit(FirstUse, &r->flags))
rebuild_and_new++; rebuild_and_new++;
} }
d++;
} }
if (new_devs == rs->raid_disks || !rebuilds) { if (new_devs == rs->raid_disks || !rebuilds) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment