Re: [PATCH] lis3: Add axes module parameter for custom axis-mapping

From: Ãric Piel
Date: Wed Sep 08 2010 - 15:28:02 EST


Op 07-09-10 21:31, Takashi Iwai schreef:
> At Tue, 07 Sep 2010 21:17:20 +0200,
> Ãric Piel wrote:
>>
>> Op 07-09-10 18:10, Takashi Iwai schreef:
>>> At Tue, 07 Sep 2010 17:54:58 +0200,
>> :
>>>>>
>>>>> +module_param_array_named(axes, lis3_dev.axis_map, int, NULL, 0644);
>>>>> +MODULE_PARM_DESC(axes, "Axis-mapping for x,y,z directions");
>>>> But now there is no check at all about the value being between 1 and 3,
>>>> is there?
>>>> I think it's still necessary to have a small function which checks for
>>>> correct values, otherwise the user could read a bit anywhere in the memory.
>>>
>>> Ah, right, it's accessing the array index. This must be fixed indeed.
>>> Another revised version below.
>>>
>> It seems to be the same patch as the previous version. You probably
>> attached the wrong patch.
>
> Oops, sorry. Attached below.
>
Looks good to me. Thanks Takashi.

Acked-by: Ãric Piel <eric.piel@xxxxxxxxxxxxxxxx>

Andrew, would you mind picking it up?
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/