Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1622644
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] mm/hmm: make it explicitly non-modular |
| Date | 2017-04-13 02:40 +0200 |
| Message-ID | <tvAXM-3zm-7@gated-at.bofh.it> (permalink) |
| References | <tvAXM-3zm-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The Kconfig currently controlling compilation of this code is:
mm/Kconfig:config HMM
mm/Kconfig: bool
...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.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Evgeny Baskakov <ebaskakov@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Mark Hairgrove <mhairgrove@nvidia.com>
Cc: Sherry Cheung <SCheung@nvidia.com>
Cc: Subhash Gutti <sgutti@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
mm/hmm.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index f567a8b3b079..8200cf275fb9 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -19,12 +19,12 @@
*/
#include <linux/mm.h>
#include <linux/hmm.h>
+#include <linux/init.h>
#include <linux/rmap.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mmzone.h>
-#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/swapops.h>
#include <linux/hugetlb.h>
@@ -1192,14 +1192,5 @@ static int __init hmm_init(void)
}
return 0;
}
-
-static void __exit hmm_exit(void)
-{
- unregister_chrdev_region(hmm_device_devt, HMM_DEVICE_MAX);
- class_destroy(hmm_device_class);
-}
-
-module_init(hmm_init);
-module_exit(hmm_exit);
-MODULE_LICENSE("GPL");
+device_initcall(hmm_init);
#endif /* IS_ENABLED(CONFIG_HMM_DEVMEM) */
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH akpm/next 0/4] Fix various issues in new hmm driver Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 02:40 +0200
[PATCH 1/4] mm/hmm: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 02:40 +0200
[PATCH 2/4] mm/hmm: fix warnings and SECTION_SIZE definition overlap Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 02:40 +0200
[PATCH 3/4] mm/hmm: fix Kconfig to have valid usage of "select" Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 02:40 +0200
[PATCH 4/4] mm/hmm: exclude 64 bit arch that explicitly fail to work. Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 02:40 +0200
Re: [PATCH 4/4] mm/hmm: exclude 64 bit arch that explicitly fail to work. Stephen Rothwell <sfr@canb.auug.org.au> - 2017-04-13 05:30 +0200
Re: [PATCH 4/4] mm/hmm: exclude 64 bit arch that explicitly fail to work. Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 06:00 +0200
Re: [PATCH 4/4] mm/hmm: exclude 64 bit arch that explicitly fail to work. Michael Ellerman <mpe@ellerman.id.au> - 2017-04-13 07:20 +0200
Re: [PATCH 4/4] mm/hmm: exclude 64 bit arch that explicitly fail to work. Paul Gortmaker <paul.gortmaker@windriver.com> - 2017-04-13 14:10 +0200
csiph-web