Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512186 > unrolled thread
| Started by | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| First post | 2016-10-30 21:40 +0100 |
| Last post | 2016-10-31 12:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 9/9] s390: virtio: make ccw explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-10-30 21:40 +0100
Re: [PATCH 9/9] s390: virtio: make ccw explicitly non-modular Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-10-31 12:00 +0100
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2016-10-30 21:40 +0100 |
| Subject | [PATCH 9/9] s390: virtio: make ccw explicitly non-modular |
| Message-ID | <sy53A-13b-15@gated-at.bofh.it> |
The Kconfig currently controlling compilation of this code is:
arch/s390/Kconfig:config S390_GUEST
arch/s390/Kconfig: def_bool y
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We replace module.h with moduleparam.h since the file does declare
some module_param() and leaving that as-is is currently the easiest
way to remain compatible with existing boot arg use cases.
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/s390/virtio/virtio_ccw.c | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 8688ad4c825f..639ed4e6afd1 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -24,7 +24,7 @@
#include <linux/wait.h>
#include <linux/list.h>
#include <linux/bitops.h>
-#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/io.h>
#include <linux/kvm_para.h>
#include <linux/notifier.h>
@@ -235,16 +235,6 @@ static struct airq_info *new_airq_info(void)
return info;
}
-static void destroy_airq_info(struct airq_info *info)
-{
- if (!info)
- return;
-
- unregister_adapter_interrupt(&info->airq);
- airq_iv_release(info->aiv);
- kfree(info);
-}
-
static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs,
u64 *first, void **airq_info)
{
@@ -1294,7 +1284,6 @@ static struct ccw_device_id virtio_ids[] = {
{ CCW_DEVICE(0x3832, 0) },
{},
};
-MODULE_DEVICE_TABLE(ccw, virtio_ids);
static struct ccw_driver virtio_ccw_driver = {
.driver = {
@@ -1406,14 +1395,4 @@ static int __init virtio_ccw_init(void)
no_auto_parse();
return ccw_driver_register(&virtio_ccw_driver);
}
-module_init(virtio_ccw_init);
-
-static void __exit virtio_ccw_exit(void)
-{
- int i;
-
- ccw_driver_unregister(&virtio_ccw_driver);
- for (i = 0; i < MAX_AIRQ_AREAS; i++)
- destroy_airq_info(airq_areas[i]);
-}
-module_exit(virtio_ccw_exit);
+device_initcall(virtio_ccw_init);
--
2.10.1
[toc] | [next] | [standalone]
| From | Cornelia Huck <cornelia.huck@de.ibm.com> |
|---|---|
| Date | 2016-10-31 12:00 +0100 |
| Message-ID | <syitP-1fZ-29@gated-at.bofh.it> |
| In reply to | #1512186 |
On Sun, 30 Oct 2016 16:37:32 -0400 Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > The Kconfig currently controlling compilation of this code is: > > arch/s390/Kconfig:config S390_GUEST > arch/s390/Kconfig: def_bool y > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We replace module.h with moduleparam.h since the file does declare > some module_param() and leaving that as-is is currently the easiest > way to remain compatible with existing boot arg use cases. > > Cc: Christian Borntraeger <borntraeger@de.ibm.com> > Cc: Cornelia Huck <cornelia.huck@de.ibm.com> > Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> > Cc: Heiko Carstens <heiko.carstens@de.ibm.com> > Cc: linux-s390@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/s390/virtio/virtio_ccw.c | 25 ++----------------------- > 1 file changed, 2 insertions(+), 23 deletions(-) There might actually be a case for making this modular, as the virtio-pci transport can be built as a module as well. But I don't think anybody really cares, and your patch is easily reverted should we want to do this later, so Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [going through the s390 tree with the other patches is probably easier as taking this through the virtio tree]
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web