mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Stuart Yoder <stuyoder@gmail.com>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>, Li Yang <leoyang.li@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	kernel@pengutronix.de, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 2/2] bus: fsl-mc: fsl-mc-allocator: Drop a write-only variable
Date: Mon, 5 Jun 2023 08:41:26 -0700	[thread overview]
Message-ID: <20230605154126.GC2480995@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230605112025.80061-2-u.kleine-koenig@pengutronix.de>

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@intel.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Nathan Chancellor <nathan@kernel.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
> 

  reply	other threads:[~2023-06-05 15:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 11:20 [PATCH 1/2] bus: fsl-mc: fsl-mc-allocator: Initialize mc_bus_dev before use Uwe Kleine-König
2023-06-05 11:20 ` [PATCH 2/2] bus: fsl-mc: fsl-mc-allocator: Drop a write-only variable Uwe Kleine-König
2023-06-05 15:41   ` Nathan Chancellor [this message]
2023-06-05 15:39 ` [PATCH 1/2] bus: fsl-mc: fsl-mc-allocator: Initialize mc_bus_dev before use Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605154126.GC2480995@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=laurentiu.tudor@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    --cc=stuyoder@gmail.com \
    --cc=trix@redhat.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®