public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add attribute container to the generic device model
Date: Tue, 11 Jan 2005 23:08:02 -0800	[thread overview]
Message-ID: <20050112070802.GB2085@kroah.com> (raw)
In-Reply-To: <1105506370.10378.26.camel@mulgrave>

On Tue, Jan 11, 2005 at 11:06:10PM -0600, James Bottomley wrote:
> Attribute containers allows a single device to belong to an arbitrary
> number of classes, each with an arbitrary number of attributes.

But classes could always have an arbitrary number of attributes, right?

> This will be used as the basis for a generic transport class, but I did
> it like this in case anyone found the abstraction useful.

Hm, I like the idea, but we already allow devices belonging to arbitrary
number of classes (through class_device) today.  What makes this
different?

And how does this change, if at all, sysfs representations of devices
that use this?

Some minor comments about the code:

> +EXPORT_SYMBOL(attribute_container_classdev_to_container);

Can these all be EXPORT_SYMBOL_GPL?  It's your choice, as you wrote the
code, but we're trying to keep the driver model stuff all GPL explicit,
as there's no way someone can say it's a "derived work" from long ago
that's using these new functions.

> +/**
> + * attribute_container_add_device - see if any container is interested in dev
> + *
> + * @dev: device to add attributes to
> + * @fn:	 function to trigger addition of class device.
> + *
> + * If no fn is provided, the code will simply register the class
> + * device via class_device_add.

You mean the class_device of the "container", right?

The code looks sane, if not a bit confusing as there's no user of it :)

thanks,

greg k-h

  reply	other threads:[~2005-01-12  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12  5:06 [PATCH] Add attribute container to the generic device model James Bottomley
2005-01-12  7:08 ` Greg KH [this message]
2005-01-12 15:17   ` James Bottomley
2005-01-12 20:17   ` James Bottomley
2005-01-12 23:19     ` Greg KH

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=20050112070802.GB2085@kroah.com \
    --to=greg@kroah.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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