public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ntb: remove unneeded DRIVER_LICENSE #defines
@ 2017-11-17 14:20 Greg Kroah-Hartman
  2017-11-17 14:53 ` Philippe Ombredanne
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-17 14:20 UTC (permalink / raw)
  To: Jon Mason, Dave Jiang, Allen Hubbe, Gary R Hook, Serge Semin
  Cc: linux-kernel, Philippe Ombredanne, linux-ntb

There is no need to #define the license of the driver, just put it in
the MODULE_LICENSE() line directly as a text string.

This allows tools that check that the module license matches the source
code license to work properly, as there is no need to unwind the
unneeded dereference, especially when the string is defined just a few
lines above the usage of it.

Cc: Jon Mason <jdmason@kudzu.us>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Allen Hubbe <Allen.Hubbe@emc.com>
Cc: Gary R Hook <gary.hook@amd.com>
Cc: Serge Semin <fancer.lancer@gmail.com>
Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/ntb/ntb.c               | 3 +--
 drivers/ntb/test/ntb_perf.c     | 3 +--
 drivers/ntb/test/ntb_pingpong.c | 3 +--
 drivers/ntb/test/ntb_tool.c     | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/ntb/ntb.c b/drivers/ntb/ntb.c
index 03b80d89b980..bdcd59b13c1f 100644
--- a/drivers/ntb/ntb.c
+++ b/drivers/ntb/ntb.c
@@ -63,12 +63,11 @@
 #define DRIVER_NAME			"ntb"
 #define DRIVER_DESCRIPTION		"PCIe NTB Driver Framework"
 
-#define DRIVER_LICENSE			"Dual BSD/GPL"
 #define DRIVER_VERSION			"1.0"
 #define DRIVER_RELDATE			"24 March 2015"
 #define DRIVER_AUTHOR			"Allen Hubbe <Allen.Hubbe@emc.com>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 759f772fa00c..d2b2e5958540 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -63,7 +63,6 @@
 #define DRIVER_NAME		"ntb_perf"
 #define DRIVER_DESCRIPTION	"PCIe NTB Performance Measurement Tool"
 
-#define DRIVER_LICENSE		"Dual BSD/GPL"
 #define DRIVER_VERSION		"1.0"
 #define DRIVER_AUTHOR		"Dave Jiang <dave.jiang@intel.com>"
 
@@ -78,7 +77,7 @@
 #define MAX_SEG_ORDER		20 /* no larger than 1M for kmalloc buffer */
 #define PIDX			NTB_DEF_PEER_IDX
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
diff --git a/drivers/ntb/test/ntb_pingpong.c b/drivers/ntb/test/ntb_pingpong.c
index 938a18bcfc3f..250cc286b768 100644
--- a/drivers/ntb/test/ntb_pingpong.c
+++ b/drivers/ntb/test/ntb_pingpong.c
@@ -68,12 +68,11 @@
 #define DRIVER_NAME			"ntb_pingpong"
 #define DRIVER_DESCRIPTION		"PCIe NTB Simple Pingpong Client"
 
-#define DRIVER_LICENSE			"Dual BSD/GPL"
 #define DRIVER_VERSION			"1.0"
 #define DRIVER_RELDATE			"24 March 2015"
 #define DRIVER_AUTHOR			"Allen Hubbe <Allen.Hubbe@emc.com>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c
index a69815c45ce6..c45b8f798f7b 100644
--- a/drivers/ntb/test/ntb_tool.c
+++ b/drivers/ntb/test/ntb_tool.c
@@ -109,12 +109,11 @@
 #define DRIVER_NAME			"ntb_tool"
 #define DRIVER_DESCRIPTION		"PCIe NTB Debugging Tool"
 
-#define DRIVER_LICENSE			"Dual BSD/GPL"
 #define DRIVER_VERSION			"1.0"
 #define DRIVER_RELDATE			"22 April 2015"
 #define DRIVER_AUTHOR			"Allen Hubbe <Allen.Hubbe@emc.com>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ntb: remove unneeded DRIVER_LICENSE #defines
  2017-11-17 14:20 [PATCH] ntb: remove unneeded DRIVER_LICENSE #defines Greg Kroah-Hartman
@ 2017-11-17 14:53 ` Philippe Ombredanne
  2017-11-27 16:15   ` Jon Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Ombredanne @ 2017-11-17 14:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jon Mason, Dave Jiang, Allen Hubbe, Gary R Hook, Serge Semin,
	LKML, linux-ntb

On Fri, Nov 17, 2017 at 3:20 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> There is no need to #define the license of the driver, just put it in
> the MODULE_LICENSE() line directly as a text string.
>
> This allows tools that check that the module license matches the source
> code license to work properly, as there is no need to unwind the
> unneeded dereference, especially when the string is defined just a few
> lines above the usage of it.
>
> Cc: Jon Mason <jdmason@kudzu.us>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Allen Hubbe <Allen.Hubbe@emc.com>
> Cc: Gary R Hook <gary.hook@amd.com>
> Cc: Serge Semin <fancer.lancer@gmail.com>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
-- 
Cordially
Philippe Ombredanne

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ntb: remove unneeded DRIVER_LICENSE #defines
  2017-11-17 14:53 ` Philippe Ombredanne
@ 2017-11-27 16:15   ` Jon Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2017-11-27 16:15 UTC (permalink / raw)
  To: Philippe Ombredanne
  Cc: Greg Kroah-Hartman, Dave Jiang, Allen Hubbe, Gary R Hook,
	Serge Semin, LKML, linux-ntb

On Fri, Nov 17, 2017 at 9:53 AM, Philippe Ombredanne
<pombredanne@nexb.com> wrote:
> On Fri, Nov 17, 2017 at 3:20 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>> There is no need to #define the license of the driver, just put it in
>> the MODULE_LICENSE() line directly as a text string.
>>
>> This allows tools that check that the module license matches the source
>> code license to work properly, as there is no need to unwind the
>> unneeded dereference, especially when the string is defined just a few
>> lines above the usage of it.
>>
>> Cc: Jon Mason <jdmason@kudzu.us>
>> Cc: Dave Jiang <dave.jiang@intel.com>
>> Cc: Allen Hubbe <Allen.Hubbe@emc.com>
>> Cc: Gary R Hook <gary.hook@amd.com>
>> Cc: Serge Semin <fancer.lancer@gmail.com>
>> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
>
> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>

Applied to my ntb-next branch.

Thanks,
Jon

> --
> Cordially
> Philippe Ombredanne

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-27 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 14:20 [PATCH] ntb: remove unneeded DRIVER_LICENSE #defines Greg Kroah-Hartman
2017-11-17 14:53 ` Philippe Ombredanne
2017-11-27 16:15   ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox