[PATCH v7 10/14] iommu/arm-smmu-v3: Put the SVA mmu notifier in the smmu_domain
Jason Gunthorpe
jgg at nvidia.com
Fri May 17 12:48:14 PDT 2024
On Mon, May 13, 2024 at 02:23:18PM -0700, Nicolin Chen wrote:
> > static void arm_smmu_mmu_notifier_free(struct mmu_notifier *mn)
> > {
> > - kfree(mn_to_smmu(mn));
> > + struct arm_smmu_domain *smmu_domain =
> > + container_of(mn, struct arm_smmu_domain, mmu_notifier);
> > +
> > + kfree(smmu_domain);
>
> Would it be cleaner to refactor mn_to_smmu to mn_to_smmu_domain?
I usually like a few more usages before making macros..
> Otherwise, would it feel simpler by just
> kfree(container_of(mn, struct arm_smmu_domain, mmu_notifier));
Sure
Jason
More information about the linux-arm-kernel
mailing list