Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577229 > unrolled thread
| Started by | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| First post | 2017-02-09 01:50 +0100 |
| Last post | 2017-02-09 20:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] vfio/mdev: Use a module softdep for vfio_mdev Alex Williamson <alex.williamson@redhat.com> - 2017-02-09 01:50 +0100
Re: [PATCH v2] vfio/mdev: Use a module softdep for vfio_mdev Kirti Wankhede <kwankhede@nvidia.com> - 2017-02-09 20:10 +0100
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2017-02-09 01:50 +0100 |
| Subject | [PATCH v2] vfio/mdev: Use a module softdep for vfio_mdev |
| Message-ID | <t8L5T-7nW-7@gated-at.bofh.it> |
Use an explicit module softdep rather than a request module call such
that the dependency is exposed to userspace. This allows us to more
easily support modules loaded at initrd time.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
v2: Remove request_module call as well, update description.
drivers/vfio/mdev/mdev_core.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 36d75c367d22..126991046eb7 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -422,18 +422,7 @@ int mdev_device_remove(struct device *dev, bool force_remove)
static int __init mdev_init(void)
{
- int ret;
-
- ret = mdev_bus_register();
-
- /*
- * Attempt to load known vfio_mdev. This gives us a working environment
- * without the user needing to explicitly load vfio_mdev driver.
- */
- if (!ret)
- request_module_nowait("vfio_mdev");
-
- return ret;
+ return mdev_bus_register();
}
static void __exit mdev_exit(void)
@@ -451,3 +440,4 @@ static void __exit mdev_exit(void)
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_SOFTDEP("post: vfio_mdev");
[toc] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2017-02-09 20:10 +0100 |
| Message-ID | <t92gq-1CS-31@gated-at.bofh.it> |
| In reply to | #1577229 |
On 2/9/2017 3:46 AM, Alex Williamson wrote:
> Use an explicit module softdep rather than a request module call such
> that the dependency is exposed to userspace. This allows us to more
> easily support modules loaded at initrd time.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>
Looks good to me.
Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
Thanks,
Kirti
> v2: Remove request_module call as well, update description.
>
> drivers/vfio/mdev/mdev_core.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
> index 36d75c367d22..126991046eb7 100644
> --- a/drivers/vfio/mdev/mdev_core.c
> +++ b/drivers/vfio/mdev/mdev_core.c
> @@ -422,18 +422,7 @@ int mdev_device_remove(struct device *dev, bool force_remove)
>
> static int __init mdev_init(void)
> {
> - int ret;
> -
> - ret = mdev_bus_register();
> -
> - /*
> - * Attempt to load known vfio_mdev. This gives us a working environment
> - * without the user needing to explicitly load vfio_mdev driver.
> - */
> - if (!ret)
> - request_module_nowait("vfio_mdev");
> -
> - return ret;
> + return mdev_bus_register();
> }
>
> static void __exit mdev_exit(void)
> @@ -451,3 +440,4 @@ static void __exit mdev_exit(void)
> MODULE_LICENSE("GPL v2");
> MODULE_AUTHOR(DRIVER_AUTHOR);
> MODULE_DESCRIPTION(DRIVER_DESC);
> +MODULE_SOFTDEP("post: vfio_mdev");
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web