ACPI/IORT: Code cleanups
Subsystems (2)
v2 cover ACPI/IORT: Code cleanups
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested with CONFIG_IOMMU_API is not selected.
[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops of iort_add_device_replay() ACPI/IORT: Remove the unused inline functions
drivers/acpi/arm64/iort.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.19.1
PATCH v2 1/2 ACPI/IORT: Drop the unused @ops of iort_add_device_replay()
Since commit d2e1a003af56 ("ACPI/IORT: Don't call iommu_ops->add_device directly"), we use the IOMMU core API to replace a direct invoke of the specified callback. The parameter @ops has therefore became unused. Let's drop it.
--- drivers/acpi/arm64/iort.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/acpi/arm64/iort.c +3 -5
@@ -811,8 +811,7 @@ static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev)return (fwspec && fwspec->ops) ? fwspec->ops :NULL ; } -static inline int iort_add_device_replay (const struct iommu_ops *ops, -struct device *dev) +static inline int iort_add_device_replay (struct device *dev) {int err =0 ;
@@ -1072,7 +1071,7 @@ const struct iommu_ops *iort_iommu_configure_id(struct device *dev,*/ if (!err) { ops =iort_fwspec_iommu_ops (dev); - err =iort_add_device_replay (ops, dev); + err =iort_add_device_replay (dev); }/* Ignore all other errors apart from EPROBE_DEFER */
@@ -1089,8 +1088,7 @@ const struct iommu_ops *iort_iommu_configure_id(struct device *dev,#else static inline const struct iommu_ops *iort_fwspec_iommu_ops (struct device *dev) {return NULL ; } -static inline int iort_add_device_replay (const struct iommu_ops *ops, -struct device *dev) +static inline int iort_add_device_replay (struct device *dev) {return 0 ; }int iort_iommu_msi_get_resv_regions (struct device *dev,struct list_head *head) {return 0 ; }
Signature · 1 line
2.19.1
PATCH v2 2/2 ACPI/IORT: Remove the unused inline functions
In reply to Zenghui YuSince commit 8212688600ed ("ACPI/IORT: Fix build error when IOMMU_SUPPORT is disabled"), iort_fwspec_iommu_ops() and iort_add_device_replay() are not needed anymore when CONFIG_IOMMU_API is not selected. Let's remove them.
--- drivers/acpi/arm64/iort.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/acpi/arm64/iort.c +0 -4
@@ -1086,10 +1086,6 @@ const struct iommu_ops *iort_iommu_configure_id(struct device *dev, }#else -static inline const struct iommu_ops *iort_fwspec_iommu_ops (struct device *dev) -{return NULL ; } -static inline int iort_add_device_replay (struct device *dev) -{return 0 ; }int iort_iommu_msi_get_resv_regions (struct device *dev,struct list_head *head) {return 0 ; } const struct iommu_ops *iort_iommu_configure_id(struct device *dev,
Signature · 1 line
2.19.1
Quoted 4 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.
Quoted 8 lines
[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functionsdrivers/acpi/arm64/iort.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Nice cleanup.
Hanjun Guo
maintainer+Cc Will
Quoted 11 lines · Hanjun Guo
Quoted 10 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functions
Quoted 6 lines
Quoted 2 lines
drivers/acpi/arm64/iort.c| 10 ++--------1 file changed, 2 insertions(+), 8 deletions(-)Nice cleanup.
Acked-by Hanjun Guo <[email protected]>
Will, would you mind taking this patch set via ARM64 tree?
Thanks
Hanjun
Will Deacon
maintainerQuoted 14 lines · Hanjun Guo
+Cc Will
Quoted 11 lines · Hanjun Guo
Quoted 10 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functions
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
drivers/acpi/arm64/iort.c| 10 ++--------1 file changed, 2 insertions(+), 8 deletions(-)Nice cleanup.
Acked-by Hanjun Guo <[email protected]>Will, would you mind taking this patch set via ARM64 tree?
Sure, no problem. I'll queue this for 5.10 later this week.
Will
Hanjun Guo
maintainerQuoted 18 lines · Will Deacon
Quoted 17 lines · Hanjun Guo
+Cc Will
Quoted 14 lines · Hanjun Guo
Quoted 12 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functionsdrivers/acpi/arm64/iort.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Nice cleanup.
Acked-by Hanjun Guo <[email protected]>Will, would you mind taking this patch set via ARM64 tree?
Sure, no problem. I'll queue this for 5.10 later this week.
Thanks!
Hanjun
Quoted 4 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.
Quoted 8 lines
[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functionsdrivers/acpi/arm64/iort.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
On the series:
Quoted 11 lines · Zenghui Yu
* From v1 [1]:
- As pointed out by Hanjun, remove two now unused inline functions. Compile tested withCONFIG_IOMMU_APIis not selected.[1] https://lore.kernel.org/r/[email protected]
Zenghui Yu (2):
ACPI/IORT: Drop the unused @ops ofiort_add_device_replay()ACPI/IORT: Remove the unused inline functions[...]
Applied to arm64 (for-next/acpi), thanks!
[1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay()
https://git.kernel.org/arm64/c/1ab64cf81489 [2/2] ACPI/IORT: Remove the unused inline functions https://git.kernel.org/arm64/c/c2bea7a1a1c0
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev