linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] leds: leds-ss4200: remove unnecessary __initdata marker
@ 2014-02-28  7:25 Jingoo Han
  2014-02-28  7:26 ` [PATCH 2/2] leds: clevo-mail: " Jingoo Han
  2014-02-28 22:33 ` [PATCH 1/2] leds: leds-ss4200: " Bryan Wu
  0 siblings, 2 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-28  7:25 UTC (permalink / raw)
  To: 'Bryan Wu'
  Cc: linux-leds, 'Richard Purdie', 'Jingoo Han',
	'Dave Hansen', 'Javier Martinez Canillas'

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/leds/leds-ss4200.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index 2bdf642..2eb3ef6 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker
  2014-02-28  7:25 [PATCH 1/2] leds: leds-ss4200: remove unnecessary __initdata marker Jingoo Han
@ 2014-02-28  7:26 ` Jingoo Han
  2014-02-28 10:29   ` Uwe Kleine-König
  2014-02-28 22:33 ` [PATCH 1/2] leds: leds-ss4200: " Bryan Wu
  1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-02-28  7:26 UTC (permalink / raw)
  To: 'Bryan Wu'
  Cc: linux-leds, 'Richard Purdie', 'Jingoo Han',
	'Márton Németh',
	'Uwe Kleine-König', 'Ondrej Zary'

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/leds/leds-clevo-mail.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index d93e245..19202f5 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <nm127@freemail.hu>");
 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");
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker
  2014-02-28  7:26 ` [PATCH 2/2] leds: clevo-mail: " Jingoo Han
@ 2014-02-28 10:29   ` Uwe Kleine-König
  2014-02-28 20:24     ` Bryan Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2014-02-28 10:29 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Bryan Wu', linux-leds, 'Richard Purdie',
	'Márton Németh', 'Ondrej Zary'

Hi,

On Fri, Feb 28, 2014 at 04:26:08PM +0900, Jingoo Han wrote:
> 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
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/leds/leds-clevo-mail.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
> index d93e245..19202f5 100644
> --- a/drivers/leds/leds-clevo-mail.c
> +++ b/drivers/leds/leds-clevo-mail.c
> @@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <nm127@freemail.hu>");
>  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");
>  
> -- 
> 1.7.10.4
> 
> 
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] leds: clevo-mail: remove unnecessary __initdata marker
  2014-02-28 10:29   ` Uwe Kleine-König
@ 2014-02-28 20:24     ` Bryan Wu
  0 siblings, 0 replies; 5+ messages in thread
From: Bryan Wu @ 2014-02-28 20:24 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Jingoo Han, Linux LED Subsystem, Richard Purdie,
	Márton Németh, Ondrej Zary

On Fri, Feb 28, 2014 at 2:29 AM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> Hi,
>
> On Fri, Feb 28, 2014 at 04:26:08PM +0900, Jingoo Han wrote:
>> 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

>>
>> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>> ---
>>  drivers/leds/leds-clevo-mail.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
>> index d93e245..19202f5 100644
>> --- a/drivers/leds/leds-clevo-mail.c
>> +++ b/drivers/leds/leds-clevo-mail.c
>> @@ -19,7 +19,7 @@ MODULE_AUTHOR("Márton Németh <nm127@freemail.hu>");
>>  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");
>>
>> --
>> 1.7.10.4
>>
>>
>>
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] leds: leds-ss4200: remove unnecessary __initdata marker
  2014-02-28  7:25 [PATCH 1/2] leds: leds-ss4200: remove unnecessary __initdata marker Jingoo Han
  2014-02-28  7:26 ` [PATCH 2/2] leds: clevo-mail: " Jingoo Han
@ 2014-02-28 22:33 ` Bryan Wu
  1 sibling, 0 replies; 5+ messages in thread
From: Bryan Wu @ 2014-02-28 22:33 UTC (permalink / raw)
  To: Jingoo Han
  Cc: Linux LED Subsystem, Richard Purdie, Dave Hansen,
	Javier Martinez Canillas

On Thu, Feb 27, 2014 at 11:25 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> Remove unnecessary __initdata marker, because it is not right
> for a module parameter. It may make the kernel oops problem.
>

Merged, thanks,
-Bryan

> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/leds/leds-ss4200.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
> index 2bdf642..2eb3ef6 100644
> --- a/drivers/leds/leds-ss4200.c
> +++ b/drivers/leds/leds-ss4200.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-28 22:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28  7:25 [PATCH 1/2] leds: leds-ss4200: remove unnecessary __initdata marker Jingoo Han
2014-02-28  7:26 ` [PATCH 2/2] leds: clevo-mail: " Jingoo Han
2014-02-28 10:29   ` Uwe Kleine-König
2014-02-28 20:24     ` Bryan Wu
2014-02-28 22:33 ` [PATCH 1/2] leds: leds-ss4200: " Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).