public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
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 15:15:03 +0100	[thread overview]
Message-ID: <1164032103.5541.12.camel@min.off.vrfy.org> (raw)
In-Reply-To: <20061120135515.38298bf5@gondolin.boeblingen.de.ibm.com>

On Mon, 2006-11-20 at 13:55 +0100, Cornelia Huck wrote: 
> From: Cornelia Huck <cornelia.huck@de.ibm.com>
> 
> Provide a function device_move() to move a device to a new parent device. Add
> auxilliary functions kobject_move() and sysfs_move_dir().
> kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
> previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
> interface kobject_uevent_env() is created that allows to add further
> environmental data to the uevent at the kobject layer.

> +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?

> +{
> +	/* 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. :)

And kobject_uevent() can just call kobject_uevent_env(), there is no
need for the indirection with do_*, right?

Thanks,
Kay


  reply	other threads:[~2006-11-20 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 14:42 [Patch -mm 2/2] driver core: Introduce device_move(): move a device to a new parent 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 [this message]
2006-11-20 15:39           ` Cornelia Huck
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=1164032103.5541.12.camel@min.off.vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=akpm@osdl.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=greg@kroah.com \
    --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