Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Tom Rix <trix@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Tom Rix and committed by
Mike Snitzer
306fbc2e 26cb62a2

-4
-4
drivers/md/dm-raid.c
··· 2209 2209 static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) 2210 2210 { 2211 2211 int role; 2212 - unsigned int d; 2213 2212 struct mddev *mddev = &rs->md; 2214 2213 uint64_t events_sb; 2215 2214 uint64_t failed_devices[DISKS_ARRAY_ELEMS]; ··· 2323 2324 * to provide capacity for redundancy or during reshape 2324 2325 * to add capacity to grow the raid set. 2325 2326 */ 2326 - d = 0; 2327 2327 rdev_for_each(r, mddev) { 2328 2328 if (test_bit(Journal, &rdev->flags)) 2329 2329 continue; ··· 2338 2340 if (test_bit(FirstUse, &r->flags)) 2339 2341 rebuild_and_new++; 2340 2342 } 2341 - 2342 - d++; 2343 2343 } 2344 2344 2345 2345 if (new_devs == rs->raid_disks || !rebuilds) {