ntb: remove unneeded DRIVER_LICENSE #defines
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Nov 2017 14:20:38 +0000 (15:20 +0100)
committerJon Mason <jdmason@kudzu.us>
Mon, 29 Jan 2018 03:17:23 +0000 (22:17 -0500)
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.

Reported-and-reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb.c
drivers/ntb/test/ntb_perf.c
drivers/ntb/test/ntb_pingpong.c
drivers/ntb/test/ntb_tool.c

index 03b80d89b98003cd20a05823dd80610d26b23920..bdcd59b13c1f7641c9fde5ee56a18dc5f4a1cf3f 100644 (file)
 #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);
index 427112cf101aa814ee210cd77d59b97c8ff90f33..6f6c602d04af724e84761bb1ad764f1f45466262 100644 (file)
@@ -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);
index 3f5a92bae6f8e4ecea11a865cbee43b5473ac052..e700873e03fbf4a22596c6df12b1c14b6a4e7297 100644 (file)
 #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);
index 91526a986caab7cc69c328df15a145c14f10899b..e490bbc8726c7dd32a7621f83b95bce1ec6173db 100644 (file)
 #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);