public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Matias Bjorling <mb@lightnvm.io>
Subject: [PATCH 1/3] lightnvm: make core.c explicitly non-modular
Date: Sat, 29 Oct 2016 16:38:41 -0400	[thread overview]
Message-ID: <20161029203843.515-2-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20161029203843.515-1-paul.gortmaker@windriver.com>

The Kconfig currently controlling compilation of this code is:

drivers/lightnvm/Kconfig:menuconfig NVM
drivers/lightnvm/Kconfig:       bool "Open-Channel SSD target support"

...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_misc_driver 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.

We replace module.h with moduleparam.h because this file still uses
module params to control behaviour.

Also note that MODULE_ALIAS is a no-op for non-modular code.

Cc: Matias Bjorling <mb@lightnvm.io>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/lightnvm/core.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 1cac0f8bc0dc..2329f050ff82 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -22,7 +22,7 @@
 #include <linux/types.h>
 #include <linux/sem.h>
 #include <linux/bitmap.h>
-#include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/miscdevice.h>
 #include <linux/lightnvm.h>
 #include <linux/sched/sysctl.h>
@@ -889,6 +889,10 @@ static const struct kernel_param_ops nvm_configure_by_str_event_param_ops = {
 	.get	= nvm_configure_get,
 };
 
+/*
+ * Not available as modular, but easiest way to remain compatible with
+ * existing boot arg behaviour is to continue using module param here.
+ */
 #undef MODULE_PARAM_PREFIX
 #define MODULE_PARAM_PREFIX	"lnvm."
 
@@ -1162,10 +1166,4 @@ static struct miscdevice _nvm_misc = {
 	.nodename	= "lightnvm/control",
 	.fops		= &_ctl_fops,
 };
-module_misc_device(_nvm_misc);
-
-MODULE_ALIAS_MISCDEV(MISC_DYNAMIC_MINOR);
-
-MODULE_AUTHOR("Matias Bjorling <m@bjorling.me>");
-MODULE_LICENSE("GPL v2");
-MODULE_VERSION("0.1");
+builtin_misc_device(_nvm_misc);
-- 
2.10.1

  reply	other threads:[~2016-10-29 20:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-29 20:38 [PATCH 0/3] Add new builtin_misc_device users Paul Gortmaker
2016-10-29 20:38 ` Paul Gortmaker [this message]
2016-10-29 22:01   ` [PATCH 1/3] lightnvm: make core.c explicitly non-modular kbuild test robot
2016-10-29 22:36     ` Paul Gortmaker
2016-10-29 20:38 ` [PATCH 2/3] blackfin: make-bf561/coreb.c " Paul Gortmaker
2016-10-30  1:02   ` kbuild test robot
2016-10-29 20:38 ` [PATCH 3/3] s390: char: make slp_ctl " Paul Gortmaker
2016-10-29 22:49   ` kbuild test robot
2016-10-30 13:43   ` Martin Schwidefsky
2016-10-30 16:04     ` Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161029203843.515-2-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox