]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/arm-smmu-v3: Do not use devm for the cd table allocations
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 6 Sep 2024 15:47:52 +0000 (12:47 -0300)
committerWill Deacon <will@kernel.org>
Mon, 9 Sep 2024 14:47:14 +0000 (15:47 +0100)
commit47b2de35cab2b683f69d03515c2658c2d8515323
treea2c91b2543c16b549cee8515bb1e0fbb6bbc664b
parent8c153ef95697242b72646d2c4cf6c4b23ccf35a3
iommu/arm-smmu-v3: Do not use devm for the cd table allocations

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.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v4-6416877274e1+1af-smmuv3_tidy_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c