Skip to contentSkip to conversation

leds: leds-ss4200: remove unnecessary __initdata marker

PATCH Applied Jingoo Han 3 participants 5 messages Feb 28, 2014 LED

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 leds: leds-ss4200: remove unnecessary __initdata marker

Remove unnecessary __initdata marker, because it is not right for a module parameter. It may make the kernel oops problem.

---
 drivers/leds/leds-ss4200.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-ss4200.c +1 -1
index 2bdf642..2eb3ef6 100644
@@ -78,7 +78,7 @@ static int __init ss4200_led_dmi_callback(const struct dmi_system_id *id)
 	return 1;
 }
 
-static bool __initdata nodetect;
+static bool nodetect;
 module_param_named(nodetect, nodetect, bool, 0);
 MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
 
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 leds: clevo-mail: remove unnecessary __initdata marker

Remove unnecessary __initdata marker, because it is not right for a module parameter. It may make the kernel oops problem.

---
 drivers/leds/leds-clevo-mail.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-clevo-mail.c +1 -1
index d93e245..19202f5 100644
@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");
 MODULE_DESCRIPTION("Clevo mail LED driver");
 MODULE_LICENSE("GPL");
 
-static bool __initdata nodetect;
+static bool nodetect;
 module_param_named(nodetect, nodetect, bool, 0);
 MODULE_PARM_DESC(nodetect, "Skip DMI hardware detection");
 
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker

Hi,

Quoted 2 lines · Jingoo Han

Remove unnecessary __initdata marker, because it is not right for a module parameter. It may make the kernel oops problem.

I wouldn't call it "unnecessary". Does the kernel oops if you access the parameter's sysfs file with __initdata in place or doesn't it? If so it's definitly not unnecessary but plain wrong.

Best regards
Uwe

Quoted 24 lines
---
 drivers/leds/leds-clevo-mail.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-clevo-mail.c +1 -1
index d93e245..19202f5 100644
@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");
 MODULE_DESCRIPTION("Clevo mail LED driver");
 MODULE_LICENSE("GPL");
 
-static bool __initdata nodetect;
+static bool nodetect;
 module_param_named(nodetect, nodetect, bool, 0);
 MODULE_PARM_DESC(nodetect, "Skip DMI hardware detection");
 
Signature · 1 line
1.7.10.4
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw

Re: [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker

Quoted 9 lines · Uwe Kleine-König

Hi,

Quoted 2 lines · Jingoo Han

Remove unnecessary __initdata marker, because it is not right for a module parameter. It may make the kernel oops problem.

I wouldn't call it "unnecessary". Does the kernel oops if you access the parameter's sysfs file with __initdata in place or doesn't it? If so it's definitly not unnecessary but plain wrong.

Exactly, I wrote a test module to use a module parameter with __initdata. And trying to access that sysfs file will cause kernel oops. So it's a wrong notation in this case, it should not be used for a module parameter.

Jingoo, I will take care of these 2 patches to replace "unnecessary" to "wrong" as Uwe suggested.

-Bryan

Quoted 28 lines
Quoted 20 lines
---
 drivers/leds/leds-clevo-mail.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-clevo-mail.c +1 -2
index d93e245..19202f5 100644
@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <[email protected]>");
 MODULE_DESCRIPTION("Clevo mail LED driver");
 MODULE_LICENSE("GPL");
 
-static bool __initdata nodetect;
+static bool nodetect;
 module_param_named(nodetect, nodetect, bool, 0);
 MODULE_PARM_DESC(nodetect, "Skip DMI hardware detection");
 
--
Quoted 4 lines

1.7.10.4

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Applied
#4 lore raw
In reply to Jingoo Han
Quoted 3 lines · Jingoo Han

Remove unnecessary __initdata marker, because it is not right for a module parameter. It may make the kernel oops problem.

Merged, thanks,
-Bryan

Quoted 22 lines
---
 drivers/leds/leds-ss4200.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-ss4200.c +1 -2
index 2bdf642..2eb3ef6 100644
@@ -78,7 +78,7 @@ static int __init ss4200_led_dmi_callback(const struct dmi_system_id *id)
        return 1;
 }
 
-static bool __initdata nodetect;
+static bool nodetect;
 module_param_named(nodetect, nodetect, bool, 0);
 MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
 
--

1.7.10.4