All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Hicks <mort@bork.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Transport Attributes -- attempt#3
Date: Fri, 16 Jan 2004 11:54:01 -0500	[thread overview]
Message-ID: <20040116165401.GK27591@localhost> (raw)
In-Reply-To: <20040116145457.C24608@infradead.org>



On Fri, Jan 16, 2004 at 02:54:57PM +0000, Christoph Hellwig wrote:
> > +menu "SCSI Transport Attributes (EXPERIMENTAL)"
> > +	depends on EXPERIMENTAL && SCSI!=n
> 
> Do you really need the experimental flags? Actually this option is
> rather bogus anyway - with your patches posted the qlogic drivers won't
> compile anymore without those set.  So either make it unconditional or
> let the drives select it.

Nope.  I just turned it on while I was testing stuff.  I will remove it
for the next patch, since a few people have tried it out now :-)

> 
> > +ifdef CONFIG_SCSI_SPI_ATTRS
> > +transport-objs			+= scsi_transport_spi.o
> > +endif
> > +ifdef CONFIG_SCSI_FC_ATTRS
> > +transport-objs			+= scsi_transport_fc.o
> > +endif
> > +
> >  scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
> >  				   scsicam.o scsi_error.o scsi_lib.o \
> >  				   scsi_scan.o scsi_syms.o scsi_sysfs.o \
> > -				   scsi_devinfo.o
> > +				   scsi_devinfo.o $(transport-objs)
> 
> This still looks quite overcomplicated, what about a simple:
> 
> scsi_mod-$(CONFIG_SCSI_SPI_ATTRS) += scsi_transport_spi.o
> scsi_mod-$(CONFIG_SCSI_FC_ATTRS)  += scsi_transport_fc.o

Okay.  I wasn't sure how to do that.  My Makefile foo is lacking.

Thanks.


> > +/* A blank transport template that is used in drivers that don't
> > + * yet implement Transport Attributes */
> > +struct scsi_transport_template blank_transport_template = { NULL };
> 
> The zero-initialization is not needed.

right.

> 
> > +void scsi_sysfs_cleanup_fc_transport(struct scsi_device *sdev)
> > +{
> > +	kfree(sdev->transport_attr_values);
> 
> I think you'll have to do the kfree in the device's ->release, but maybe
> I got all that sysfs-foo wrong :)

I'll take a closer look.

> > +	/* Default values for the transport attributes */
> > +	void *default_attr_values;
> 
> Should this really be a void *?

I think so.  It has to be a struct spi_transport_attrs or a
fc_transport_attrs, depending on which transport template we're talking
about.

> 
> > +extern struct scsi_transport_template blank_transport_template;
> 
> Should be in scsi_priv.h as it's not exported, no?

Yup.

Thanks again,
mh

-- 
Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE

  reply	other threads:[~2004-01-16 16:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 18:54 Transport Attributes -- attempt#2 Martin Hicks
2004-01-08 13:17 ` Christoph Hellwig
2004-01-08 14:01   ` Martin Hicks
2004-01-08 14:11     ` James Bottomley
2004-01-14 18:12   ` Transport Attributes -- attempt#3 Martin Hicks
2004-01-14 23:34     ` Andrew Vasquez
2004-01-16 16:40       ` Martin Hicks
2004-01-17  0:23       ` Lincoln Dale
2004-01-14 23:58     ` Patrick Mansfield
2004-01-16 14:54     ` Christoph Hellwig
2004-01-16 16:54       ` Martin Hicks [this message]
2004-01-20  0:07     ` Brian King
2004-01-20 19:49       ` Patrick Mansfield
2004-01-20 20:38         ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15 12:52 Martin Peschke3
2004-01-16 16:47 ` Martin Hicks
2004-01-20 12:29 Martin Peschke3
2004-01-20 23:20 Martin Peschke3
2004-01-20 23:45 ` Mike Anderson

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=20040116165401.GK27591@localhost \
    --to=mort@bork.org \
    --cc=hch@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.