2021-05-08 01:52:47

by Bixuan Cui

[permalink] [raw]
Subject: [PATCH -next] iommu/virtio: Add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Bixuan Cui <[email protected]>
---
drivers/iommu/virtio-iommu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 7c02481a81b4..c6e5ee4d9cef 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1136,6 +1136,7 @@ static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_IOMMU, VIRTIO_DEV_ANY_ID },
{ 0 },
};
+MODULE_DEVICE_TABLE(virtio, id_table);

static struct virtio_driver virtio_iommu_drv = {
.driver.name = KBUILD_MODNAME,


2021-05-12 17:16:15

by Jean-Philippe Brucker

[permalink] [raw]
Subject: Re: [PATCH -next] iommu/virtio: Add missing MODULE_DEVICE_TABLE

On Sat, May 08, 2021 at 11:14:51AM +0800, Bixuan Cui wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Bixuan Cui <[email protected]>

Fixes: fa4afd78ea12 ("iommu/virtio: Build virtio-iommu as module")
Reviewed-by: Jean-Philippe Brucker <[email protected]>

> ---
> drivers/iommu/virtio-iommu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
> index 7c02481a81b4..c6e5ee4d9cef 100644
> --- a/drivers/iommu/virtio-iommu.c
> +++ b/drivers/iommu/virtio-iommu.c
> @@ -1136,6 +1136,7 @@ static struct virtio_device_id id_table[] = {
> { VIRTIO_ID_IOMMU, VIRTIO_DEV_ANY_ID },
> { 0 },
> };
> +MODULE_DEVICE_TABLE(virtio, id_table);
>
> static struct virtio_driver virtio_iommu_drv = {
> .driver.name = KBUILD_MODNAME,
>

2021-05-19 17:38:09

by Joerg Roedel

[permalink] [raw]
Subject: Re: [PATCH -next] iommu/virtio: Add missing MODULE_DEVICE_TABLE

On Sat, May 08, 2021 at 11:14:51AM +0800, Bixuan Cui wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Bixuan Cui <[email protected]>
> ---
> drivers/iommu/virtio-iommu.c | 1 +
> 1 file changed, 1 insertion(+)

Applied for v5.13, thanks.