Skip to content

Commit 0ed08f8

Browse files
gregkhjonmason
authored andcommitted
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. 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>
1 parent 140eb52 commit 0ed08f8

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎drivers/ntb/ntb.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@
6363
#define DRIVER_NAME "ntb"
6464
#define DRIVER_DESCRIPTION "PCIe NTB Driver Framework"
6565

66-
#define DRIVER_LICENSE "Dual BSD/GPL"
6766
#define DRIVER_VERSION "1.0"
6867
#define DRIVER_RELDATE "24 March 2015"
6968
#define DRIVER_AUTHOR "Allen Hubbe <Allen.Hubbe@emc.com>"
7069

71-
MODULE_LICENSE(DRIVER_LICENSE);
70+
MODULE_LICENSE("Dual BSD/GPL");
7271
MODULE_VERSION(DRIVER_VERSION);
7372
MODULE_AUTHOR(DRIVER_AUTHOR);
7473
MODULE_DESCRIPTION(DRIVER_DESCRIPTION);

‎drivers/ntb/test/ntb_perf.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#define DRIVER_NAME "ntb_perf"
6464
#define DRIVER_DESCRIPTION "PCIe NTB Performance Measurement Tool"
6565

66-
#define DRIVER_LICENSE "Dual BSD/GPL"
6766
#define DRIVER_VERSION "1.0"
6867
#define DRIVER_AUTHOR "Dave Jiang <dave.jiang@intel.com>"
6968

@@ -78,7 +77,7 @@
7877
#define MAX_SEG_ORDER 20 /* no larger than 1M for kmalloc buffer */
7978
#define PIDX NTB_DEF_PEER_IDX
8079

81-
MODULE_LICENSE(DRIVER_LICENSE);
80+
MODULE_LICENSE("Dual BSD/GPL");
8281
MODULE_VERSION(DRIVER_VERSION);
8382
MODULE_AUTHOR(DRIVER_AUTHOR);
8483
MODULE_DESCRIPTION(DRIVER_DESCRIPTION);

‎drivers/ntb/test/ntb_pingpong.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,11 @@
6868
#define DRIVER_NAME "ntb_pingpong"
6969
#define DRIVER_DESCRIPTION "PCIe NTB Simple Pingpong Client"
7070

71-
#define DRIVER_LICENSE "Dual BSD/GPL"
7271
#define DRIVER_VERSION "1.0"
7372
#define DRIVER_RELDATE "24 March 2015"
7473
#define DRIVER_AUTHOR "Allen Hubbe <Allen.Hubbe@emc.com>"
7574

76-
MODULE_LICENSE(DRIVER_LICENSE);
75+
MODULE_LICENSE("Dual BSD/GPL");
7776
MODULE_VERSION(DRIVER_VERSION);
7877
MODULE_AUTHOR(DRIVER_AUTHOR);
7978
MODULE_DESCRIPTION(DRIVER_DESCRIPTION);

‎drivers/ntb/test/ntb_tool.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@
109109
#define DRIVER_NAME "ntb_tool"
110110
#define DRIVER_DESCRIPTION "PCIe NTB Debugging Tool"
111111

112-
#define DRIVER_LICENSE "Dual BSD/GPL"
113112
#define DRIVER_VERSION "1.0"
114113
#define DRIVER_RELDATE "22 April 2015"
115114
#define DRIVER_AUTHOR "Allen Hubbe <Allen.Hubbe@emc.com>"
116115

117-
MODULE_LICENSE(DRIVER_LICENSE);
116+
MODULE_LICENSE("Dual BSD/GPL");
118117
MODULE_VERSION(DRIVER_VERSION);
119118
MODULE_AUTHOR(DRIVER_AUTHOR);
120119
MODULE_DESCRIPTION(DRIVER_DESCRIPTION);

0 commit comments

Comments
 (0)