Re: [PATCH] usb: ohci-nxp: add support for stotg04 phy

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

 



On 30/07/2020 08:43:03+0200, Greg KH wrote:
> > 
> > > +	s32 vendor, product;
> > > +
> > > +	vendor = i2c_smbus_read_word_data(isp1301_i2c_client, 0x00);
> > > +	product = i2c_smbus_read_word_data(isp1301_i2c_client, 0x02);
> 
> Why are these signed 32bit numbers?  Shouldn't they be unsigned?

Because i2c_smbus_read_word_data returns an s32 and should be checked
for errors but because the whole driver is never checking, I'll leave
that as an exercise for outreachy interns.

> > > +
> > > +	if (vendor == 0x0483 && product == 0xa0c4)
> 
> No endian flips anywhere?
> 

The whole driver makes the assumption that it will only run on lpc32xx
with an isp1301. I don't believe we will ever see an other platform
using it.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



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

  Powered by Linux