On Mon, May 13, 2002, Greg KH <[EMAIL PROTECTED]> wrote:
> On Mon, May 13, 2002 at 11:31:17AM -0400, Johannes Erdfelt wrote:
> > > Now when the last person calls usb_put_dev() or usb_free_dev() the
> > > structure is cleaned up.  This allows the different host controller
> > > drivers to implement their logic differently if they want to (as they
> > > do), and everyone can be happy and stop arguing about the "proper" way
> > > to write their host controller drivers :)
> > 
> > Do you mean that HCD's can cleanup after buggy device drivers?
> > 
> > I don't think anyone was arguing how the proper way to their write their
> > host controller driver is, but rather what the proper coding convention
> > is in the kernel.
> 
> Oh, that's easily settled.  To quote Documentation/CodingStyle, chapter
> 8:
>       Remember: if another thread can find your data structure, and
>       you don't have a reference count on it, you almost certainly
>       have a bug.
> 
> The combination of these two patches now solves that bug.
> 
> <shameless_plug>
> For more description of "proper" kernel coding style, I have a paper and
> presentation at OLS this year:
> http://www.linuxsymposium.org/2002/view_txt.php?text=abstract&talk=57
> </shameless_plug>

So what you wrote above "Now when the last person calls
usb_put_dev()..." was also describing the changes relative to David's
original method of doing reference counting and not to my patch?

I was talking about something else, specifically the extra cleanups some
HCD's had.

Take for instance usb-uhci.c. Georg even responded saying he didn't feel
comfortable removing that.

However, I've proven that there's no possible way for the disconnect
callback to be made if reference counting is being used correctly. In
that case, the code is completely superfluous.

I made the same mistake originally, but I removed it from uhci.c when I
realized that it's an impossible condition.

JE


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to