[PATCH v2 07/10] iommu/arm-smmu-v3: Do not use devm for the cd table allocations

Nicolin Chen nicolinc at nvidia.com
Mon Jun 10 19:39:37 PDT 2024


On Mon, Jun 10, 2024 at 09:31:16PM -0300, Jason Gunthorpe wrote:
> The master->cd_table is entirely contained within the struct
> arm_smmu_master which is guaranteed to be freed by the core code under
> arm_smmu_release_device().
> 
> There is no reason to use devm here, arm_smmu_free_cd_tables() is reliably
> called to free the CD related memory. Remove it and save some memory.
> 
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>

Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>



More information about the linux-arm-kernel mailing list