Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH] iommu/virtio: Fix compile error with viommu_capable()
@ 2022-09-07 15:11 Joerg Roedel
  2022-09-07 15:37 ` Jean-Philippe Brucker
  2022-09-07 15:59 ` Robin Murphy
  0 siblings, 2 replies; 3+ messages in thread
From: Joerg Roedel @ 2022-09-07 15:11 UTC (permalink / raw)
  To: Joerg Roedel, iommu
  Cc: Jean-Philippe Brucker, Joerg Roedel, Robin Murphy, linux-kernel,
	virtualization, Will Deacon

From: Joerg Roedel <jroedel@suse.de>

A recent fix introduced viommu_capable() but other changes
from Robin change the function signature of the call-back it
is used for.

When both changes are merged a compile error will happen
because the function pointer types mismatch. Fix that by
updating the viommu_capable() signature after the merge.

Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/virtio-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index da463db9f12a..1b12825e2df1 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1005,7 +1005,7 @@ static int viommu_of_xlate(struct device *dev, struct of_phandle_args *args)
 	return iommu_fwspec_add_ids(dev, args->args, 1);
 }
 
-static bool viommu_capable(enum iommu_cap cap)
+static bool viommu_capable(struct device *dev, enum iommu_cap cap)
 {
 	switch (cap) {
 	case IOMMU_CAP_CACHE_COHERENCY:
-- 
2.36.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

* Re: [PATCH] iommu/virtio: Fix compile error with viommu_capable()
  2022-09-07 15:11 [PATCH] iommu/virtio: Fix compile error with viommu_capable() Joerg Roedel
@ 2022-09-07 15:37 ` Jean-Philippe Brucker
  2022-09-07 15:59 ` Robin Murphy
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Philippe Brucker @ 2022-09-07 15:37 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Joerg Roedel, Will Deacon, linux-kernel, virtualization, iommu,
	Robin Murphy

On Wed, Sep 07, 2022 at 05:11:54PM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> A recent fix introduced viommu_capable() but other changes
> from Robin change the function signature of the call-back it
> is used for.
> 
> When both changes are merged a compile error will happen
> because the function pointer types mismatch. Fix that by
> updating the viommu_capable() signature after the merge.
> 
> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

> ---
>  drivers/iommu/virtio-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
> index da463db9f12a..1b12825e2df1 100644
> --- a/drivers/iommu/virtio-iommu.c
> +++ b/drivers/iommu/virtio-iommu.c
> @@ -1005,7 +1005,7 @@ static int viommu_of_xlate(struct device *dev, struct of_phandle_args *args)
>  	return iommu_fwspec_add_ids(dev, args->args, 1);
>  }
>  
> -static bool viommu_capable(enum iommu_cap cap)
> +static bool viommu_capable(struct device *dev, enum iommu_cap cap)
>  {
>  	switch (cap) {
>  	case IOMMU_CAP_CACHE_COHERENCY:
> -- 
> 2.36.1
> 
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

* Re: [PATCH] iommu/virtio: Fix compile error with viommu_capable()
  2022-09-07 15:11 [PATCH] iommu/virtio: Fix compile error with viommu_capable() Joerg Roedel
  2022-09-07 15:37 ` Jean-Philippe Brucker
@ 2022-09-07 15:59 ` Robin Murphy
  1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2022-09-07 15:59 UTC (permalink / raw)
  To: Joerg Roedel, iommu
  Cc: Jean-Philippe Brucker, Joerg Roedel, Will Deacon, linux-kernel,
	virtualization

On 2022-09-07 16:11, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> A recent fix introduced viommu_capable() but other changes
> from Robin change the function signature of the call-back it
> is used for.
> 
> When both changes are merged a compile error will happen
> because the function pointer types mismatch. Fix that by
> updating the viommu_capable() signature after the merge.

I thought I'd called out somewhere that this was going to be a conflict, 
but apparently not, sorry about that.

Acked-by: Robin Murphy <robin.murphy@arm.com>

Lemme spin a patch for the outstanding LKP warning on the bus series 
before that gets annoying too...

> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>   drivers/iommu/virtio-iommu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
> index da463db9f12a..1b12825e2df1 100644
> --- a/drivers/iommu/virtio-iommu.c
> +++ b/drivers/iommu/virtio-iommu.c
> @@ -1005,7 +1005,7 @@ static int viommu_of_xlate(struct device *dev, struct of_phandle_args *args)
>   	return iommu_fwspec_add_ids(dev, args->args, 1);
>   }
>   
> -static bool viommu_capable(enum iommu_cap cap)
> +static bool viommu_capable(struct device *dev, enum iommu_cap cap)
>   {
>   	switch (cap) {
>   	case IOMMU_CAP_CACHE_COHERENCY:
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-07 15:11 [PATCH] iommu/virtio: Fix compile error with viommu_capable() Joerg Roedel
2022-09-07 15:37 ` Jean-Philippe Brucker
2022-09-07 15:59 ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox