Skip to content

Commit 7bc4361

Browse files
Tom Rixliu-song-6
authored andcommitted
md/raid5: remove unused working_disks variable
clang with W=1 reports drivers/md/raid5.c:7719:6: error: variable 'working_disks' set but not used [-Werror,-Wunused-but-set-variable] int working_disks = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230327132324.1769595-1-trix@redhat.com
1 parent 7cddb05 commit 7bc4361

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/md/raid5.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7716,7 +7716,6 @@ static void raid5_set_io_opt(struct r5conf *conf)
77167716
static int raid5_run(struct mddev *mddev)
77177717
{
77187718
struct r5conf *conf;
7719-
int working_disks = 0;
77207719
int dirty_parity_disks = 0;
77217720
struct md_rdev *rdev;
77227721
struct md_rdev *journal_dev = NULL;
@@ -7912,10 +7911,8 @@ static int raid5_run(struct mddev *mddev)
79127911
pr_warn("md: cannot handle concurrent replacement and reshape.\n");
79137912
goto abort;
79147913
}
7915-
if (test_bit(In_sync, &rdev->flags)) {
7916-
working_disks++;
7914+
if (test_bit(In_sync, &rdev->flags))
79177915
continue;
7918-
}
79197916
/* This disc is not fully in-sync. However if it
79207917
* just stored parity (beyond the recovery_offset),
79217918
* when we don't need to be concerned about the

0 commit comments

Comments
 (0)