Re: [PATCH] [RFC] USB: EHCI: mark several functions as maybe unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 5 Oct 2010, Alan Stern wrote:

> On Tue, 5 Oct 2010, Uwe Kleine-König wrote:
> 
> > > > /me continues to dig around ...
> > > > Hmm, usb_hcd_reset_endpoint seems handle .endpoint_reset being NULL.
> > > 
> > > That's for backward compatibility.  I figured it was better to operate
> > > in a degraded mode than to crash with a NULL pointer exception.  :-)
> > Well, I think letting other people's kernel crash is the only way to
> > make them fix their code.  This code was introduced by 3444b26afa145 in
> > April 2009.  I guess with a NULL pointer exception the last user would
> > have been found earlier.  (Note, I didn't check that mxc was the last
> > user.)
> 
> There's another reason for allowing endpoint_reset to be NULL.  As I 
> mentioned before, it's optional for non-EHCI drivers.

On the other hand, clear_tt_buffer_complete is never called if the
driver isn't EHCI.  Consequently there's no real need for a NULL check.  
If you send in a patch removing that check, I'll ACK it.  (Provided you
also doublecheck all the other in-tree drivers to make sure the pointer
entry is present.)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux