linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	Trevor Woerner <twoerner@gmail.com>,
	jamesg@zaltys.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: ohci-nxp: add support for stotg04 phy
Date: Thu, 30 Jul 2020 13:35:21 +0200	[thread overview]
Message-ID: <20200730113521.GC3679@piout.net> (raw)
In-Reply-To: <20200730064303.GA3909742@kroah.com>

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

  reply	other threads:[~2020-07-30 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 21:27 lpc32xx and stotg04 Trevor Woerner
2020-07-29 17:28 ` Alexandre Belloni
2020-07-29 17:49   ` [PATCH] usb: ohci-nxp: add support for stotg04 phy Alexandre Belloni
2020-07-29 18:00     ` Sergei Shtylyov
2020-07-30  6:43       ` Greg KH
2020-07-30 11:35         ` Alexandre Belloni [this message]
2020-07-30 18:51   ` lpc32xx and stotg04 Trevor Woerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200730113521.GC3679@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jamesg@zaltys.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sergei.shtylyov@gmail.com \
    --cc=twoerner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).