Skip to contentSkip to conversation

ntb: remove unneeded DRIVER_LICENSE #defines

PATCH Applied Greg Kroah-Hartman 3 participants 3 messages Nov 17, 2017 – Nov 27, 2017 NTB driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ntb: remove unneeded DRIVER_LICENSE #defines

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.

---
 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(-)
drivers/ntb/ntb.c +1 -2
index 03b80d89b980..bdcd59b13c1f 100644
@@ -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 <[email protected]>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
drivers/ntb/test/ntb_perf.c +1 -2
index 759f772fa00c..d2b2e5958540 100644
@@ -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 <[email protected]>"
 
@@ -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);
drivers/ntb/test/ntb_pingpong.c +1 -2
index 938a18bcfc3f..250cc286b768 100644
@@ -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 <[email protected]>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
drivers/ntb/test/ntb_tool.c +1 -2
index a69815c45ce6..c45b8f798f7b 100644
@@ -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 <[email protected]>"
 
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRIVER_VERSION);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
Signature · 1 line
2.15.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Greg Kroah-Hartman

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.

Quoted 7 lines
Signature · 2 lines
Cordially
Philippe Ombredanne
maintainer Applied
#2 lore raw
Quoted 19 lines · Philippe Ombredanne
Quoted 8 lines · Greg Kroah-Hartman

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.

Quoted 7 lines
Quoted 1 line

Applied to my ntb-next branch.

Thanks,
Jon

Quoted 3 lines

--
Cordially
Philippe Ombredanne