public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi sysfs cleanups
Date: Tue, 19 Nov 2002 16:46:33 -0800	[thread overview]
Message-ID: <20021120004632.GA2671@beaverton.ibm.com> (raw)
In-Reply-To: <20021119231614.A27242@infradead.org>

Christoph Hellwig [hch@infradead.org] wrote:
> On Tue, Nov 19, 2002 at 10:39:08AM -0800, Mike Anderson wrote:
> > I was trying to ensure consistency and type checking of class_data used
> > by host of class type scsi-host.
> > 
> > In the device model the struct device contains three void pointers for
> > use by associated member. driver_data is a private data pointer for the
> > device driver. class_data is for use by the class in this case scsi-host
> > class.
> 
> Still the casts make no sense at all.  in C you can assign a void pointer
> to any other pointer and the other way around.
> 

Ok, I guess I misunderstood (read to fast) what your issue was on this. I
removed the casts.

> > 
> > The *device_driver* interfaces are possibly not needed any more as I
> > originally had them exported because they where being called directly by
> > the upper layers.  Now they are being called by the mid-layer which this
> > *.o is linked. In the future the upper layers could call these directly
> > as the operations in scsi_register_device are handled by the sysfs layer
> > if upper layers fully support the device model probe / remove / release.
> 
> But they shouldn't.  Each additional exported interface makes life harder.
> Please don't export stuff unless it's really required.
> 

I removed them.


> > The *host_class* are interfaces for the LLDD to call to register and
> > unregister as a scsi host class driver.
> > 
> > These interfaces are used in a scsi_debug patch I have beyond scsi_debug
> > 1.65 that demonstrate the used of these interfaces.
> 
> Again, see above.  What do these interfaces actually gain us over
> scsi_add_host/scsi_remove_host?  If it helps us in practice (of which I
> still need to be convienced) remove scsi_add_host/scsi_remove_host when
> exporting those, but don't keep both.
> 

The only issue with removing the scsi_add_host and scsi_remove_host and
replacing them with something like the *host_class* is that the host
class interfaces assume the caller has a struct device to pass in.
Currently there are callers of scsi_add_host that appear to not support
the new device model.

-andmike
--
Michael Anderson
andmike@us.ibm.com


      reply	other threads:[~2002-11-20  0:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-19 15:30 [PATCH] scsi sysfs cleanups Mike Anderson
2002-11-19 16:48 ` Christoph Hellwig
2002-11-19 18:39   ` Mike Anderson
2002-11-19 23:16     ` Christoph Hellwig
2002-11-20  0:46       ` Mike Anderson [this message]

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=20021120004632.GA2671@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox