lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW6=zpRso=5wPUWTPKO+s1Z0Nf09BDpSnb5sKHkEgizbHg@mail.gmail.com>
Date:   Tue, 28 Mar 2023 16:17:32 -0700
From:   Song Liu <song@...nel.org>
To:     Tom Rix <trix@...hat.com>
Cc:     nathan@...nel.org, ndesaulniers@...gle.com,
        linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH v2] md/raid5: remove unused working_disks variable

On Mon, Mar 27, 2023 at 6:23 AM Tom Rix <trix@...hat.com> wrote:
>
> 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@...hat.com>

Applied to md-next, with Yu Kuai's Reviewed-by.

Thanks,
Song

> ---
> v2: remove brances
> ---
>  drivers/md/raid5.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 7b820b81d8c2..812a12e3e41a 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -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
> --
> 2.27.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ