Skip to content

Commit a941bed

Browse files
tudorlchleroy
authored andcommitted
bus: fsl-mc: drop useless cleanup
This cleanup is actually a no-op because the resources are freed when the device objects are removed from the allocator at driver remove time. Remove the fsl_mc_cleanup_all_resource_pools() function and its call site. Signed-off-by: Laurentiu Tudor <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christophe Leroy <[email protected]>
1 parent a8c17b9 commit a941bed

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

drivers/bus/fsl-mc/dprc-driver.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,6 @@ int dprc_cleanup(struct fsl_mc_device *mc_dev)
806806
dev_set_msi_domain(&mc_dev->dev, NULL);
807807
}
808808

809-
fsl_mc_cleanup_all_resource_pools(mc_dev);
810-
811809
/* if this step fails we cannot go further with cleanup as there is no way of
812810
* communicating with the firmware
813811
*/

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -555,27 +555,6 @@ void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev)
555555
}
556556
}
557557

558-
static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev,
559-
enum fsl_mc_pool_type pool_type)
560-
{
561-
struct fsl_mc_resource *resource;
562-
struct fsl_mc_resource *next;
563-
struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);
564-
struct fsl_mc_resource_pool *res_pool =
565-
&mc_bus->resource_pools[pool_type];
566-
567-
list_for_each_entry_safe(resource, next, &res_pool->free_list, node)
568-
devm_kfree(&mc_bus_dev->dev, resource);
569-
}
570-
571-
void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev)
572-
{
573-
int pool_type;
574-
575-
for (pool_type = 0; pool_type < FSL_MC_NUM_POOL_TYPES; pool_type++)
576-
fsl_mc_cleanup_resource_pool(mc_bus_dev, pool_type);
577-
}
578-
579558
/*
580559
* fsl_mc_allocator_probe - callback invoked when an allocatable device is
581560
* being added to the system

drivers/bus/fsl-mc/fsl-mc-private.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,6 @@ int __init fsl_mc_allocator_driver_init(void);
629629

630630
void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
631631

632-
void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
633-
634632
int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
635633
enum fsl_mc_pool_type pool_type,
636634
struct fsl_mc_resource

0 commit comments

Comments
 (0)