* [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device
@ 2022-08-01 16:51 Andy Shevchenko
2022-08-09 7:20 ` Jean-Philippe Brucker
2022-09-07 8:38 ` Joerg Roedel
0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-08-01 16:51 UTC (permalink / raw)
To: Joerg Roedel, Jean-Philippe Brucker, virtualization, iommu,
linux-kernel
Cc: Joerg Roedel, Will Deacon, Robin Murphy, Andy Shevchenko
In order to make the underneath API easier to change in the future,
prevent users from dereferencing fwnode from struct device.
Instead, use the specific device_match_fwnode() API for that.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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 08eeafc9529f..9fe723f55213 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -925,7 +925,7 @@ static struct virtio_driver virtio_iommu_drv;
static int viommu_match_node(struct device *dev, const void *data)
{
- return dev->parent->fwnode == data;
+ return device_match_fwnode(dev->parent, data);
}
static struct viommu_dev *viommu_get_by_fwnode(struct fwnode_handle *fwnode)
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device
2022-08-01 16:51 [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device Andy Shevchenko
@ 2022-08-09 7:20 ` Jean-Philippe Brucker
2022-08-23 14:08 ` Andy Shevchenko
2022-09-07 8:38 ` Joerg Roedel
1 sibling, 1 reply; 4+ messages in thread
From: Jean-Philippe Brucker @ 2022-08-09 7:20 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joerg Roedel, virtualization, iommu, linux-kernel, Joerg Roedel,
Will Deacon, Robin Murphy
On Mon, Aug 01, 2022 at 07:51:42PM +0300, Andy Shevchenko wrote:
> In order to make the underneath API easier to change in the future,
> prevent users from dereferencing fwnode from struct device.
> Instead, use the specific device_match_fwnode() API for that.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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 08eeafc9529f..9fe723f55213 100644
> --- a/drivers/iommu/virtio-iommu.c
> +++ b/drivers/iommu/virtio-iommu.c
> @@ -925,7 +925,7 @@ static struct virtio_driver virtio_iommu_drv;
>
> static int viommu_match_node(struct device *dev, const void *data)
> {
> - return dev->parent->fwnode == data;
> + return device_match_fwnode(dev->parent, data);
> }
>
> static struct viommu_dev *viommu_get_by_fwnode(struct fwnode_handle *fwnode)
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device
2022-08-09 7:20 ` Jean-Philippe Brucker
@ 2022-08-23 14:08 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-08-23 14:08 UTC (permalink / raw)
To: Jean-Philippe Brucker
Cc: Joerg Roedel, virtualization, iommu, linux-kernel, Joerg Roedel,
Will Deacon, Robin Murphy
On Tue, Aug 09, 2022 at 08:20:48AM +0100, Jean-Philippe Brucker wrote:
> On Mon, Aug 01, 2022 at 07:51:42PM +0300, Andy Shevchenko wrote:
> > In order to make the underneath API easier to change in the future,
> > prevent users from dereferencing fwnode from struct device.
> > Instead, use the specific device_match_fwnode() API for that.
> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Thanks!
Can it be applied now?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device
2022-08-01 16:51 [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device Andy Shevchenko
2022-08-09 7:20 ` Jean-Philippe Brucker
@ 2022-09-07 8:38 ` Joerg Roedel
1 sibling, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2022-09-07 8:38 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Joerg Roedel, Jean-Philippe Brucker, virtualization, iommu,
linux-kernel, Will Deacon, Robin Murphy
On Mon, Aug 01, 2022 at 07:51:42PM +0300, Andy Shevchenko wrote:
> drivers/iommu/virtio-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-07 8:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01 16:51 [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device Andy Shevchenko
2022-08-09 7:20 ` Jean-Philippe Brucker
2022-08-23 14:08 ` Andy Shevchenko
2022-09-07 8:38 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox