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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <afd9db2f-72af-8ac0-9ab1-655fc79d992e@huaweicloud.com>
Date:   Mon, 27 Mar 2023 09:37:05 +0800
From:   Yu Kuai <yukuai1@...weicloud.com>
To:     Tom Rix <trix@...hat.com>, song@...nel.org, nathan@...nel.org,
        ndesaulniers@...gle.com
Cc:     linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH] md/raid5: remove unused working_disks variable

Hi,

在 2023/03/26 20:56, Tom Rix 写道:
> 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.

Other than some nits below, this patch looks good to me, feel free to
add:

Reviewed-by: Yu Kuai <yukuai3@...wei.com>

Please also mention that commit 908f4fbd2657 ("md/raid5: be more
thorough in calculating 'degraded' value.") remove the last reference.
> 
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>   drivers/md/raid5.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 7b820b81d8c2..2b1e78c46817 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;
> @@ -7913,7 +7912,6 @@ static int raid5_run(struct mddev *mddev)
>   			goto abort;
>   		}
>   		if (test_bit(In_sync, &rdev->flags)) {
> -			working_disks++;
Please remove the braces as well,

Thanks,
Kuai
>   			continue;
>   		}
>   		/* This disc is not fully in-sync.  However if it
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ