diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-06-05 13:20:25 +0200 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2023-06-09 00:56:26 +0200 |
commit | fb9c384625dd604e8a5be1f42b35e83104b90670 (patch) | |
tree | 1e8a7602e1b61bad2348377d3c10f780e67810d8 /drivers/bus | |
parent | bus: fsl-mc: fsl-mc-allocator: Initialize mc_bus_dev before use (diff) | |
download | linux-fb9c384625dd604e8a5be1f42b35e83104b90670.tar.xz linux-fb9c384625dd604e8a5be1f42b35e83104b90670.zip |
bus: fsl-mc: fsl-mc-allocator: Drop a write-only variable
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>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 |
1 files changed, 1 insertions, 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) |