Skip to contentSkip to conversation

HID: holtekff: move MODULE_* parameters out of #ifdef block

PATCH Applied Daniel Axtens 4 participants 4 messages Nov 26, 2017 – Dec 1, 2017 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: holtekff: move MODULE_* parameters out of #ifdef block

If you compile with:
CONFIG_HID_HOLTEK=m
CONFIG_HOLTEK_FF is not set

You get the following warning:
WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o see include/linux/module.h for more information

Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF block and into the un-guarded part of the file.

---
 drivers/hid/hid-holtekff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hid/hid-holtekff.c +4 -4
index 9325545fc3ae..edc0f64bb584 100644
@@ -32,10 +32,6 @@
 
 #ifdef CONFIG_HOLTEK_FF
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Anssi Hannula <[email protected]>");
-MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
-
 /*
  * These commands and parameters are currently known:
  *
@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = {
 	.probe = holtek_probe,
 };
 module_hid_driver(holtek_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Anssi Hannula <[email protected]>");
+MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw

Hi,

Daniel Axtens kirjoitti 2017-11-26 06:34:

Quoted 4 lines

If you compile with:
CONFIG_HID_HOLTEK=m
CONFIG_HOLTEK_FF is not set

Quoted 8 lines

You get the following warning:
WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o see include/linux/module.h for more information

Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF block and into the un-guarded part of the file.

Thanks!

Quoted 29 lines
---
 drivers/hid/hid-holtekff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hid/hid-holtekff.c +0 -4
index 9325545fc3ae..edc0f64bb584 100644
@@ -32,10 +32,6 @@
 
 #ifdef CONFIG_HOLTEK_FF
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Anssi Hannula <[email protected]>");
-MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip
 based devices");
-
 /*
  * These commands and parameters are currently known:

*

drivers/hid/hid-holtekff.c +4 -0
@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = {
 	.probe = holtek_probe,
 };
 module_hid_driver(holtek_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Anssi Hannula <[email protected]>");
+MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip

based devices");

Signature · 1 line
Anssi Hannula
Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel Axtens
Quoted 8 lines · Daniel Axtens

If you compile with:
CONFIG_HID_HOLTEK=m
CONFIG_HOLTEK_FF is not set

You get the following warning:
WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o see include/linux/module.h for more information

Quoted 5 lines

Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF block and into the un-guarded part of the file.

---

Cheers,
Benjamin

Quoted 29 lines
 drivers/hid/hid-holtekff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hid/hid-holtekff.c +4 -4
index 9325545fc3ae..edc0f64bb584 100644
@@ -32,10 +32,6 @@
 
 #ifdef CONFIG_HOLTEK_FF
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Anssi Hannula <[email protected]>");
-MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
-
 /*
  * These commands and parameters are currently known:
  *
@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = {
 	.probe = holtek_probe,
 };
 module_hid_driver(holtek_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Anssi Hannula <[email protected]>");
+MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
Signature · 1 line
2.11.0
maintainer Applied
#3 lore raw
In reply to Daniel Axtens
Quoted 4 lines · Daniel Axtens

If you compile with:
CONFIG_HID_HOLTEK=m
CONFIG_HOLTEK_FF is not set

Quoted 8 lines

You get the following warning:
WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o see include/linux/module.h for more information

Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF block and into the un-guarded part of the file.

Applied to for-4.15/upstream-fixes. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs