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: <20230605154126.GC2480995@dev-arch.thelio-3990X>
Date:   Mon, 5 Jun 2023 08:41:26 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Li Yang <leoyang.li@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        kernel@...gutronix.de, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 2/2] bus: fsl-mc: fsl-mc-allocator: Drop a write-only
 variable

On Mon, Jun 05, 2023 at 01:20:25PM +0200, Uwe Kleine-König wrote:
> Fixes a clang compiler warning:
> 
>    drivers/bus/fsl-mc/fsl-mc-allocator.c:565:6: warning: variable 'free_count' set but not used [-Wunused-but-set-variable]
>            int free_count = 0;
> 
> Fixes: d8e026a44919 ("staging: fsl-mc: remove some superfluous WARN_ONs")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>

Reviewed-by: Nathan Chancellor <nathan@...nel.org>

> ---
>  drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> index 991273f956ce..b5e8c021fa1f 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c
> +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> @@ -563,12 +563,9 @@ static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev,
>  	struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);
>  	struct fsl_mc_resource_pool *res_pool =
>  					&mc_bus->resource_pools[pool_type];
> -	int free_count = 0;
>  
> -	list_for_each_entry_safe(resource, next, &res_pool->free_list, node) {
> -		free_count++;
> +	list_for_each_entry_safe(resource, next, &res_pool->free_list, node)
>  		devm_kfree(&mc_bus_dev->dev, resource);
> -	}
>  }
>  
>  void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev)
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ