All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH] platform: intel_turbo_max_3: make it explicitly non-modular
Date: Mon, 13 Feb 2017 19:37:00 -0500	[thread overview]
Message-ID: <20170214003700.8978-1-paul.gortmaker@windriver.com> (raw)

The Kconfig currently controlling compilation of this code is:

drivers/platform/x86/Kconfig:config INTEL_TURBO_MAX_3
drivers/platform/x86/Kconfig:   bool "Intel Turbo Boost Max Technology 3.0 enumeration driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

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

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

We do uncover some implicit includes during build coverage that
were hidden behind the module.h which pulls in a lot of dependants.

Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/platform/x86/intel_turbo_max_3.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/intel_turbo_max_3.c b/drivers/platform/x86/intel_turbo_max_3.c
index 0103f5b32e34..4f60d8e32a0a 100644
--- a/drivers/platform/x86/intel_turbo_max_3.c
+++ b/drivers/platform/x86/intel_turbo_max_3.c
@@ -3,6 +3,8 @@
  * Copyright (c) 2017, Intel Corporation.
  * All rights reserved.
  *
+ * Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
  * version 2, as published by the Free Software Foundation.
@@ -16,7 +18,9 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/topology.h>
+#include <linux/workqueue.h>
 #include <linux/cpuhotplug.h>
 #include <linux/cpufeature.h>
 #include <asm/cpu_device_id.h>
@@ -123,7 +127,6 @@ static const struct x86_cpu_id itmt_legacy_cpu_ids[] = {
 	ICPU(INTEL_FAM6_BROADWELL_X),
 	{}
 };
-MODULE_DEVICE_TABLE(x86cpu, itmt_legacy_cpu_ids);
 
 static int __init itmt_legacy_init(void)
 {
@@ -146,7 +149,3 @@ static int __init itmt_legacy_init(void)
 	return 0;
 }
 late_initcall(itmt_legacy_init)
-
-MODULE_DESCRIPTION("Intel Turbo Boost Max 3.0 enumeration driver");
-MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
-MODULE_LICENSE("GPL v2");
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	<platform-driver-x86@vger.kernel.org>
Subject: [PATCH] platform: intel_turbo_max_3: make it explicitly non-modular
Date: Mon, 13 Feb 2017 19:37:00 -0500	[thread overview]
Message-ID: <20170214003700.8978-1-paul.gortmaker@windriver.com> (raw)

The Kconfig currently controlling compilation of this code is:

drivers/platform/x86/Kconfig:config INTEL_TURBO_MAX_3
drivers/platform/x86/Kconfig:   bool "Intel Turbo Boost Max Technology 3.0 enumeration driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

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

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

We do uncover some implicit includes during build coverage that
were hidden behind the module.h which pulls in a lot of dependants.

Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/platform/x86/intel_turbo_max_3.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/intel_turbo_max_3.c b/drivers/platform/x86/intel_turbo_max_3.c
index 0103f5b32e34..4f60d8e32a0a 100644
--- a/drivers/platform/x86/intel_turbo_max_3.c
+++ b/drivers/platform/x86/intel_turbo_max_3.c
@@ -3,6 +3,8 @@
  * Copyright (c) 2017, Intel Corporation.
  * All rights reserved.
  *
+ * Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
  * version 2, as published by the Free Software Foundation.
@@ -16,7 +18,9 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/topology.h>
+#include <linux/workqueue.h>
 #include <linux/cpuhotplug.h>
 #include <linux/cpufeature.h>
 #include <asm/cpu_device_id.h>
@@ -123,7 +127,6 @@ static const struct x86_cpu_id itmt_legacy_cpu_ids[] = {
 	ICPU(INTEL_FAM6_BROADWELL_X),
 	{}
 };
-MODULE_DEVICE_TABLE(x86cpu, itmt_legacy_cpu_ids);
 
 static int __init itmt_legacy_init(void)
 {
@@ -146,7 +149,3 @@ static int __init itmt_legacy_init(void)
 	return 0;
 }
 late_initcall(itmt_legacy_init)
-
-MODULE_DESCRIPTION("Intel Turbo Boost Max 3.0 enumeration driver");
-MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
-MODULE_LICENSE("GPL v2");
-- 
2.11.0

             reply	other threads:[~2017-02-14  0:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  0:37 Paul Gortmaker [this message]
2017-02-14  0:37 ` [PATCH] platform: intel_turbo_max_3: make it explicitly non-modular Paul Gortmaker
2017-02-17  3:37 ` Darren Hart
2017-02-17 15:42   ` Paul Gortmaker
2017-02-17 15:42     ` Paul Gortmaker
2017-02-20 15:55   ` Srinivas Pandruvada
2017-02-21 18:35     ` Darren Hart

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=20170214003700.8978-1-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.