[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 1/4] mm/hmm: make it explicitly non-modular
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 <>
Cc: Evgeny Baskakov <>
Cc: John Hubbard <>
Cc: Mark Hairgrove <>
Cc: Sherry Cheung <>
Cc: Subhash Gutti <>
Cc: Andrew Morton <>
Signed-off-by: Paul Gortmaker <>
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);
 \ /
  Last update: 2017-04-13 02:33    [W:0.062 / U:10.624 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site