md/raid5: remove unused working_disks variable
authorTom Rix <trix@redhat.com>
Mon, 27 Mar 2023 13:23:24 +0000 (09:23 -0400)
committerSong Liu <song@kernel.org>
Fri, 14 Apr 2023 07:42:04 +0000 (00:42 -0700)
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
drivers/md/raid5.c

index 7b820b81d8c2b0d359292d46697a0a86f07da33a..812a12e3e41a276e3faa867ffdb16fa613472287 100644 (file)
@@ -7716,7 +7716,6 @@ static void raid5_set_io_opt(struct r5conf *conf)
 static int raid5_run(struct mddev *mddev)
 {
        struct r5conf *conf;
-       int working_disks = 0;
        int dirty_parity_disks = 0;
        struct md_rdev *rdev;
        struct md_rdev *journal_dev = NULL;
@@ -7912,10 +7911,8 @@ static int raid5_run(struct mddev *mddev)
                        pr_warn("md: cannot handle concurrent replacement and reshape.\n");
                        goto abort;
                }
-               if (test_bit(In_sync, &rdev->flags)) {
-                       working_disks++;
+               if (test_bit(In_sync, &rdev->flags))
                        continue;
-               }
                /* This disc is not fully in-sync.  However if it
                 * just stored parity (beyond the recovery_offset),
                 * when we don't need to be concerned about the