From: "Éric Piel" <eric.piel@tremplin-utc.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jean Delvare <khali@linux-fr.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lis3: Add axes module parameter for custom axis-mapping
Date: Tue, 07 Sep 2010 17:54:58 +0200 [thread overview]
Message-ID: <4C866052.5020206@tremplin-utc.net> (raw)
In-Reply-To: <s5heid58vfv.wl%tiwai@suse.de>
Op 07-09-10 16:44, Takashi Iwai schreef:
:
>> Wouldn't it be much cleaner if lis3_dev.ac was an array instead of a
>> struct? I don't mind that it involves changing more line if it makes
>> things more understandable.
>
> OK, then it makes things easier. The revised patch is below.
Yes, I like it much better...
>
> +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.
Eric
next prev parent reply other threads:[~2010-09-07 15:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 12:23 [PATCH] lis3: Add axes module parameter for custom axis-mapping Takashi Iwai
2010-09-07 6:45 ` Takashi Iwai
2010-09-07 9:14 ` Jean Delvare
2010-09-07 9:16 ` Takashi Iwai
2010-09-07 14:25 ` Éric Piel
2010-09-07 14:44 ` Takashi Iwai
2010-09-07 15:54 ` Éric Piel [this message]
2010-09-07 16:10 ` Takashi Iwai
2010-09-07 19:17 ` Éric Piel
2010-09-07 19:31 ` Takashi Iwai
2010-09-08 19:28 ` Éric Piel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C866052.5020206@tremplin-utc.net \
--to=eric.piel@tremplin-utc.net \
--cc=akpm@linux-foundation.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.