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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 28, 2014 at 2:29 AM, Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> 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@xxxxxxxxxxx>
>> ---
>>  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@xxxxxxxxxxx>");
>>  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/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux