> -----Original Message----- > From: Christoph Hellwig [mailto:[email protected]] > Sent: 21 April 2022 07:49 > To: Shameerali Kolothum Thodi <[email protected]> > Cc: [email protected]; [email protected]; > [email protected]; Linuxarm <[email protected]>; > [email protected]; [email protected]; [email protected]; > [email protected]; wanghuiqiang <[email protected]>; Guohanjun > (Hanjun Guo) <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected] > Subject: Re: [PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR > reserved regions > [...] > > void generic_iommu_put_resv_regions(struct device *dev, struct list_head > *list) > > { > > struct iommu_resv_region *entry, *next; > > > > - list_for_each_entry_safe(entry, next, list, list) > > + list_for_each_entry_safe(entry, next, list, list) { > > + if (entry->resv_region_free_fw_data) > > + entry->resv_region_free_fw_data(dev, entry); > > kfree(entry); > > I'd move the kfree to the free callback if present. This would also > allow to hide the union from the common code entirely and use a > container structure like: > > struct iommu_iort_rmr_data { > struct iommu_resv_region rr; > > /* Stream IDs associated with IORT RMR entry */ > const u32 *sids; > u32 num_sids; > }; Ok. I will respin soon with the above changes. Thanks, Shameer _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
RE: [PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions
Shameerali Kolothum Thodi via iommu Thu, 21 Apr 2022 07:50:23 -0700
- [PATCH v10 0/9] ACPI/IORT: Support for... Shameer Kolothum via iommu
- [PATCH v10 1/9] iommu: Introduce ... Shameer Kolothum via iommu
- Re: [PATCH v10 1/9] iommu: In... Christoph Hellwig
- [PATCH v10 2/9] ACPI/IORT: Make i... Shameer Kolothum via iommu
- Re: [PATCH v10 2/9] ACPI/IORT... Christoph Hellwig
- [PATCH v10 3/9] ACPI/IORT: Provid... Shameer Kolothum via iommu
- Re: [PATCH v10 3/9] ACPI/IORT... Christoph Hellwig
- [PATCH v10 4/9] ACPI/IORT: Add su... Shameer Kolothum via iommu
- Re: [PATCH v10 4/9] ACPI/IORT... Christoph Hellwig
- RE: [PATCH v10 4/9] ACPI/... Shameerali Kolothum Thodi via iommu
- [PATCH v10 5/9] ACPI/IORT: Add a ... Shameer Kolothum via iommu
- [PATCH v10 6/9] iommu/arm-smmu-v3... Shameer Kolothum via iommu
- [PATCH v10 7/9] iommu/arm-smmu-v3... Shameer Kolothum via iommu
- [PATCH v10 8/9] iommu/arm-smmu-v3... Shameer Kolothum via iommu
- [PATCH v10 9/9] iommu/arm-smmu: G... Shameer Kolothum via iommu
- Re: [PATCH v10 0/9] ACPI/IORT: Su... Steven Price
- RE: [PATCH v10 0/9] ACPI/IORT... Shameerali Kolothum Thodi via iommu
- Re: [PATCH v10 0/9] ACPI/... Robin Murphy
