From: Greg KH <greg@kroah.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Patrick Mochel <mochel@osdl.org>,
Mike Anderson <andmike@us.ibm.com>
Subject: Re: [RFC] support for sysfs string based properties for SCSI (1/3)
Date: Mon, 5 May 2003 10:17:45 -0700 [thread overview]
Message-ID: <20030505171745.GA1477@kroah.com> (raw)
In-Reply-To: <1052154516.1888.33.camel@mulgrave>
On Mon, May 05, 2003 at 12:08:35PM -0500, James Bottomley wrote:
> On Mon, 2003-05-05 at 12:02, Greg KH wrote:
> > On Sat, May 03, 2003 at 02:19:23PM -0500, James Bottomley wrote:
> > > diff -Nru a/drivers/base/core.c b/drivers/base/core.c
> > > --- a/drivers/base/core.c Sat May 3 14:18:21 2003
> > > +++ b/drivers/base/core.c Sat May 3 14:18:21 2003
> > > @@ -42,6 +42,8 @@
> > >
> > > if (dev_attr->show)
> > > ret = dev_attr->show(dev,buf);
> > > + else if (dev->bus->show)
> > > + ret = dev->bus->show(dev, buf, attr);
> > > return ret;
> >
> > Can't you do this by using the class interface instead?
>
> I don't know, I haven't digested the class interface patches yet, since
> they just appeared this morning.
I think Mike has a patch queued up that takes advantage of the class
code, which might address all of these issues. Mike?
> > This also forces you to do a lot of string compares within the bus show
> > function (as your example did) which is almost as unwieldy as just
> > having individual show functions, right? :)
>
> Nothing prevents users from doing it the callback way. However,
> callbacks aren't a scaleable interface for properties that have to be
> shared and overridden.
I don't understand the "shared and overridden" aspect. Do you mean a
default attribute for all types of SCSI devices, with the ability for an
individual device to override the attribute with it's own values if it
wants to? That still seems doable within the driver model today,
without having to rely on bus specific functions.
Hm, this is _really_ calling for what Pat calls "attributes". Take a
look at the ones in the class model, and let me know if those would work
for you for devices. If so, I'll be glad to add them, which should help
you out here.
Hope this helps,
greg k-h
next prev parent reply other threads:[~2003-05-05 17:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-03 19:11 [RFC] support for sysfs string based properties for SCSI (1/3) James Bottomley
2003-05-03 19:19 ` James Bottomley
2003-05-03 19:25 ` [RFC] support for sysfs string based properties for SCSI (2/3) James Bottomley
2003-05-03 19:30 ` [RFC] support for sysfs string based properties for SCSI (3/3) James Bottomley
2003-05-05 17:02 ` [RFC] support for sysfs string based properties for SCSI (1/3) Greg KH
2003-05-05 17:08 ` James Bottomley
2003-05-05 17:17 ` Greg KH [this message]
2003-05-05 20:08 ` Mike Anderson
2003-05-06 0:05 ` James Bottomley
2003-05-13 21:02 ` Patrick Mochel
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=20030505171745.GA1477@kroah.com \
--to=greg@kroah.com \
--cc=James.Bottomley@SteelEye.com \
--cc=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mochel@osdl.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