Re: question about drivers/usb/musb/musb_core.c

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

 




On Fri, 28 Oct 2016, Bin Liu wrote:

> On Fri, Oct 28, 2016 at 04:53:03PM -0400, Greg Kroah-Hartman wrote:
> > On Fri, Oct 28, 2016 at 10:33:19PM +0200, Julia Lawall wrote:
> > >
> > >
> > > On Fri, 28 Oct 2016, Julia Lawall wrote:
> > >
> > > > The file drivers/usb/musb/musb_core.c contains the code:
> > > >
> > > > static DEVICE_ATTR(srp, 0644, NULL, musb_srp_store);
> > > >
> > > > Is it correct to have NULL in the third argument for an attribute that can
> > > > be read?  Should the permission be 0444 instead?
> > >
> > > Sorry, I got that backwards.  Should the permission be 0200?
> >
> > Even better yet, it should be using DEVICE_ATTR_WO() to be explicit and
> > make it impossible to get wrong.
> >
> > Unless this file is set up this way for userspace to later change the
> > permission so that others can write to it?  I don't know the history
> > here...
>
> The musb driver history has so many unknowns... I am wondering if there
> is still anyone uses srp on musb...
>
> But I think we can change the driver to whatever we need nowadays, just
> like what we did on parameter use_dma about a year ago (51676c8d).

Thanks for the feedback.

julia
--
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