From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg KH <greg@kroah.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [Patch -mm 1/1] driver core: Introduce device_move(): move a device to a new parent.
Date: Mon, 20 Nov 2006 16:39:46 +0100 [thread overview]
Message-ID: <20061120163946.38c878d7@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <1164032103.5541.12.camel@min.off.vrfy.org>
On Mon, 20 Nov 2006 15:15:03 +0100,
Kay Sievers <kay.sievers@vrfy.org> wrote:
> > +void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
> > + int num_envp, char *envp[])
>
> We usually use a NULL terminated array for things like this. Does
> passing the number of entries give us an advantage?
In do_kobject_uevent:
envp = kzalloc((NUM_ENVP + num_envp) * sizeof (char *), GFP_KERNEL);
We would either need to allocate (NUM_ENVP + NUM_EXT_ENVP) or NUM_ENVP
(as before).
> > +{
> > + /* Disallow dumb users. */
> > + if (num_envp > NUM_EXT_ENVP)
> > + return;
>
> Why do we need such a limit? There are still thousand other ways to
> screw things up. :)
If we removed this, we could also use only NUM_ENVP in the allocation
above and kill NUM_EXT_ENVP. Hm.
> And kobject_uevent() can just call kobject_uevent_env(), there is no
> need for the indirection with do_*, right?
OK, may look nicer. I'll respin.
--
Cornelia Huck
Linux for zSeries Developer
Tel.: +49-7031-16-4837, Mail: cornelia.huck@de.ibm.com
next prev parent reply other threads:[~2006-11-20 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 14:42 [Patch -mm 2/2] " Cornelia Huck
2006-11-16 16:47 ` Kay Sievers
2006-11-17 4:23 ` Greg KH
2006-11-20 8:05 ` Cornelia Huck
2006-11-20 12:55 ` [Patch -mm 1/1] " Cornelia Huck
2006-11-20 14:15 ` Kay Sievers
2006-11-20 15:39 ` Cornelia Huck [this message]
2006-11-20 16:07 ` Cornelia Huck
2006-11-20 22:42 ` Kay Sievers
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=20061120163946.38c878d7@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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®