All of lore.kernel.org
 help / color / mirror / Atom feed
* sim710_device_remove seems buggy
@ 2007-07-17 16:55 Matthew Wilcox
  2007-07-17 18:52 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2007-07-17 16:55 UTC (permalink / raw)
  To: Richard Hirst; +Cc: linux-scsi


Hi Richard,

I was looking for inspiration in sim710 when I found what appears to me
to be a bug.  Your implementation of sim710_device_remove does:

sim710_device_remove(struct device *dev)
{
        struct Scsi_Host *host = dev_to_shost(dev);

Now, this is going to be called with the struct device corresponding to
either the MCA or EISA device which is the *parent* of the shost.
dev_to_shost only looks upwards in the tree, so it will never find the
shost.

Unfortunately, I don't have a good idea about how to solve this.  The
least lame perhaps is to have separate routines for EISA and MCA
devices, each of which passes the shost to this routine.

-- 
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-17 19:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 16:55 sim710_device_remove seems buggy Matthew Wilcox
2007-07-17 18:52 ` Matthew Wilcox
2007-07-17 18:57   ` James Bottomley
2007-07-17 19:38     ` Matthew Wilcox

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.