linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ACPI/IORT: Code cleanups
@ 2020-08-18  6:36 Zenghui Yu
  2020-08-18  6:36 ` [PATCH v2 1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Zenghui Yu
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Zenghui Yu @ 2020-08-18  6:36 UTC (permalink / raw)
  To: lorenzo.pieralisi, guohanjun, sudeep.holla
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, wanghaibin.wang, Zenghui Yu

* 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/20200817105946.1511-1-yuzenghui@huawei.com

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(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay()
  2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
@ 2020-08-18  6:36 ` Zenghui Yu
  2020-08-18  6:36 ` [PATCH v2 2/2] ACPI/IORT: Remove the unused inline functions Zenghui Yu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Zenghui Yu @ 2020-08-18  6:36 UTC (permalink / raw)
  To: lorenzo.pieralisi, guohanjun, sudeep.holla
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, wanghaibin.wang, Zenghui Yu

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.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 drivers/acpi/arm64/iort.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index ec782e4a0fe4..a0ece0e201b2 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -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; }
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/2] ACPI/IORT: Remove the unused inline functions
  2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
  2020-08-18  6:36 ` [PATCH v2 1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Zenghui Yu
@ 2020-08-18  6:36 ` Zenghui Yu
  2020-08-18  9:16 ` [PATCH v2 0/2] ACPI/IORT: Code cleanups Hanjun Guo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Zenghui Yu @ 2020-08-18  6:36 UTC (permalink / raw)
  To: lorenzo.pieralisi, guohanjun, sudeep.holla
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, wanghaibin.wang, Zenghui Yu

Since 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.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 drivers/acpi/arm64/iort.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index a0ece0e201b2..e670785a6201 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -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,
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
  2020-08-18  6:36 ` [PATCH v2 1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Zenghui Yu
  2020-08-18  6:36 ` [PATCH v2 2/2] ACPI/IORT: Remove the unused inline functions Zenghui Yu
@ 2020-08-18  9:16 ` Hanjun Guo
  2020-09-02  9:17   ` Hanjun Guo
  2020-09-02  9:29 ` Lorenzo Pieralisi
  2020-09-07 16:05 ` Will Deacon
  4 siblings, 1 reply; 9+ messages in thread
From: Hanjun Guo @ 2020-08-18  9:16 UTC (permalink / raw)
  To: Zenghui Yu, lorenzo.pieralisi, sudeep.holla
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, wanghaibin.wang

On 2020/8/18 14:36, Zenghui Yu wrote:
> * 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/20200817105946.1511-1-yuzenghui@huawei.com
> 
> 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(-)

Nice cleanup.

Acked-by: Hanjun Guo <guohanjun@huawei.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-08-18  9:16 ` [PATCH v2 0/2] ACPI/IORT: Code cleanups Hanjun Guo
@ 2020-09-02  9:17   ` Hanjun Guo
  2020-09-02  9:48     ` Will Deacon
  0 siblings, 1 reply; 9+ messages in thread
From: Hanjun Guo @ 2020-09-02  9:17 UTC (permalink / raw)
  To: Zenghui Yu, lorenzo.pieralisi, sudeep.holla
  Cc: linux-acpi, linux-arm-kernel, linux-kernel, wanghaibin.wang, Will Deacon

+Cc Will

On 2020/8/18 17:16, Hanjun Guo wrote:
> On 2020/8/18 14:36, Zenghui Yu wrote:
>> * 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/20200817105946.1511-1-yuzenghui@huawei.com
>>
>> 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(-)
> 
> Nice cleanup.
> 
> Acked-by: Hanjun Guo <guohanjun@huawei.com>

Will, would you mind taking this patch set via ARM64 tree?

Thanks
Hanjun


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
                   ` (2 preceding siblings ...)
  2020-08-18  9:16 ` [PATCH v2 0/2] ACPI/IORT: Code cleanups Hanjun Guo
@ 2020-09-02  9:29 ` Lorenzo Pieralisi
  2020-09-07 16:05 ` Will Deacon
  4 siblings, 0 replies; 9+ messages in thread
From: Lorenzo Pieralisi @ 2020-09-02  9:29 UTC (permalink / raw)
  To: Zenghui Yu
  Cc: guohanjun, sudeep.holla, linux-acpi, linux-arm-kernel,
	linux-kernel, wanghaibin.wang

On Tue, Aug 18, 2020 at 02:36:23PM +0800, Zenghui Yu wrote:
> * 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/20200817105946.1511-1-yuzenghui@huawei.com
> 
> 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(-)

On the series:

Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-09-02  9:17   ` Hanjun Guo
@ 2020-09-02  9:48     ` Will Deacon
  2020-09-02 11:55       ` Hanjun Guo
  0 siblings, 1 reply; 9+ messages in thread
From: Will Deacon @ 2020-09-02  9:48 UTC (permalink / raw)
  To: Hanjun Guo
  Cc: Zenghui Yu, lorenzo.pieralisi, sudeep.holla, linux-acpi,
	linux-arm-kernel, linux-kernel, wanghaibin.wang

On Wed, Sep 02, 2020 at 05:17:43PM +0800, Hanjun Guo wrote:
> +Cc Will
> 
> On 2020/8/18 17:16, Hanjun Guo wrote:
> > On 2020/8/18 14:36, Zenghui Yu wrote:
> > > * 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/20200817105946.1511-1-yuzenghui@huawei.com
> > > 
> > > 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(-)
> > 
> > Nice cleanup.
> > 
> > Acked-by: Hanjun Guo <guohanjun@huawei.com>
> 
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-09-02  9:48     ` Will Deacon
@ 2020-09-02 11:55       ` Hanjun Guo
  0 siblings, 0 replies; 9+ messages in thread
From: Hanjun Guo @ 2020-09-02 11:55 UTC (permalink / raw)
  To: Will Deacon
  Cc: Zenghui Yu, lorenzo.pieralisi, sudeep.holla, linux-acpi,
	linux-arm-kernel, linux-kernel, wanghaibin.wang

On 2020/9/2 17:48, Will Deacon wrote:
> On Wed, Sep 02, 2020 at 05:17:43PM +0800, Hanjun Guo wrote:
>> +Cc Will
>>
>> On 2020/8/18 17:16, Hanjun Guo wrote:
>>> On 2020/8/18 14:36, Zenghui Yu wrote:
>>>> * 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/20200817105946.1511-1-yuzenghui@huawei.com
>>>>
>>>> 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(-)
>>>
>>> Nice cleanup.
>>>
>>> Acked-by: Hanjun Guo <guohanjun@huawei.com>
>>
>> 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] ACPI/IORT: Code cleanups
  2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
                   ` (3 preceding siblings ...)
  2020-09-02  9:29 ` Lorenzo Pieralisi
@ 2020-09-07 16:05 ` Will Deacon
  4 siblings, 0 replies; 9+ messages in thread
From: Will Deacon @ 2020-09-07 16:05 UTC (permalink / raw)
  To: lorenzo.pieralisi, sudeep.holla, Zenghui Yu, guohanjun
  Cc: catalin.marinas, kernel-team, Will Deacon, wanghaibin.wang,
	linux-acpi, linux-arm-kernel, linux-kernel

On Tue, 18 Aug 2020 14:36:23 +0800, Zenghui Yu wrote:
> * 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/20200817105946.1511-1-yuzenghui@huawei.com
> 
> Zenghui Yu (2):
>   ACPI/IORT: Drop the unused @ops of iort_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,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-07 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  6:36 [PATCH v2 0/2] ACPI/IORT: Code cleanups Zenghui Yu
2020-08-18  6:36 ` [PATCH v2 1/2] ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Zenghui Yu
2020-08-18  6:36 ` [PATCH v2 2/2] ACPI/IORT: Remove the unused inline functions Zenghui Yu
2020-08-18  9:16 ` [PATCH v2 0/2] ACPI/IORT: Code cleanups Hanjun Guo
2020-09-02  9:17   ` Hanjun Guo
2020-09-02  9:48     ` Will Deacon
2020-09-02 11:55       ` Hanjun Guo
2020-09-02  9:29 ` Lorenzo Pieralisi
2020-09-07 16:05 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).