From: Rusty Russell <rusty@rustcorp.com.au>
To: Tejun Heo <tj@home-tj.org>
Cc: mochel@osdl.org,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/PATCH] Per-device parameter support (2/16)
Date: Mon, 25 Oct 2004 14:28:59 +1000 [thread overview]
Message-ID: <1098678539.8098.11.camel@localhost.localdomain> (raw)
In-Reply-To: <20041023042421.GC3456@home-tj.org>
On Sat, 2004-10-23 at 13:24 +0900, Tejun Heo wrote:
> dp_02_param_array_bug.diff
>
> This is the 2nd patch of 16 patches for devparam.
>
> This patches fixes param_array_set() to not use arr->max as nump
> argument of param_array. If arr->max is used as nump and the
> configuration variable is exported writeable in the syfs, the size of
> the array will be limited by the smallest number of elements
> specified. One side effect is that as the actual number of elements
> is not recorded anymore when nump is NULL, all elements should be
> printed when referencing the corresponding sysfs node. I don't think
> that will cause any problem.
I thought of this, but I prefer to see this fixed by another element in
the struct kernel_param which is used as "num" if nump is NULL.
Although this creates some bloat, it doesn't truncate as mine does, or
allow overflows and printing unset values as yours does.
(Printing unset values is usually OK, since before the new parameter
stuff, there was no way of telling how many elements had been set. This
lead authors to use a magic value for "unset". They no longer need to
do this, so we might see them start to rely on that).
Cheers,
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
next prev parent reply other threads:[~2004-10-25 4:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-23 4:24 Tejun Heo
2004-10-25 4:28 ` Rusty Russell [this message]
2004-10-25 7:18 ` Tejun Heo
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=1098678539.8098.11.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=tj@home-tj.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®