leds: leds-ss4200: remove unnecessary __initdata marker
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
@@ -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
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
@@ -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
Re: [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker
Hi,
Quoted 2 lines · Jingoo Han
Remove unnecessary
__initdatamarker, 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
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-clevo-mail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-clevo-mail.c +1
-1@@ -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/ |
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
__initdatamarker, 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
__initdatain 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
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-clevo-mail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-clevo-mail.c +1
-2@@ -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/ |
Bryan Wu
AppliedQuoted 3 lines · Jingoo Han
Remove unnecessary
__initdatamarker, because it is not right for a module parameter. It may make the kernel oops problem.
Merged, thanks,
-Bryan
Quoted 22 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/leds/leds-ss4200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-ss4200.c +1
-2@@ -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