dm-raid: silence compiler warning on rebuilds_per_group.
authorNeilBrown <neilb@suse.de>
Thu, 9 May 2013 00:27:49 +0000 (10:27 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2013 14:13:11 +0000 (07:13 -0700)
commit 3f6bbd3ffd7b733dd705e494663e5761aa2cb9c1 upstream.

This doesn't really need to be initialised, but it doesn't hurt,
silences the compiler, and as it is a counter it makes sense for it to
start at zero.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-raid.c

index 1d3fe1a40a9bfdaea27bdaeb44208443f08f2d95..2dea49c4279e23db60239b7c20b8f08040599ae6 100644 (file)
@@ -380,7 +380,7 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size)
 static int validate_raid_redundancy(struct raid_set *rs)
 {
        unsigned i, rebuild_cnt = 0;
-       unsigned rebuilds_per_group, copies, d;
+       unsigned rebuilds_per_group = 0, copies, d;
        unsigned group_size, last_group_start;
 
        for (i = 0; i < rs->md.raid_disks; i++)