Skip to content

Commit fb9c384

Browse files
Uwe Kleine-KönigLi Yang
authored andcommitted
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: d8e026a ("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>
1 parent e0d43ed commit fb9c384

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/bus/fsl-mc/fsl-mc-allocator.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,9 @@ static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev,
563563
struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);
564564
struct fsl_mc_resource_pool *res_pool =
565565
&mc_bus->resource_pools[pool_type];
566-
int free_count = 0;
567566

568-
list_for_each_entry_safe(resource, next, &res_pool->free_list, node) {
569-
free_count++;
567+
list_for_each_entry_safe(resource, next, &res_pool->free_list, node)
570568
devm_kfree(&mc_bus_dev->dev, resource);
571-
}
572569
}
573570

574571
void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev)

0 commit comments

Comments
 (0)