Re: [PATCHv2] staging: dwc2: Fix code that gets the nummber of host channels

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

 



On Tue, Oct 01, 2013 at 01:21:28AM +0000, Paul Zimmerman wrote:
> > From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> > Sent: Monday, September 30, 2013 6:09 PM
> > 
> > Yeah.  I guess it's fine...  I was going to suggest adding the + 1 in a
> > different place but actually it doesn't matter.
> > 
> > The key to understanding dwc2_set_param_host_channels() is that the
> > "val" parameter is always -1.  That means it always returns -EINVAL and
> > the caller jumbles the error code in with some other error codes and
> > then ignores any errors.  :/
> 
> The intent of this was that the value can be overridden by the platform
> code if required, in which case "val" would not be -1. However, to my
> knowledge, no in-tree platforms do that, so I guess it would be fine to
> redo this as you suggest below. We can always add it back if needed.
> 

Why are we even adding one to the number of channels that the hardware
reports?

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux