mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/6] usb: string: Use le16_to_cpu for langid
Date: Mon, 14 Oct 2019 17:09:54 +0200	[thread overview]
Message-ID: <20191014150954.dc7kyboblvlpvswm@tellis.lin.mbt.kalray.eu> (raw)
In-Reply-To: <20191014114248.o2k4wsbuumqwbnaj@pengutronix.de>

> > --- a/drivers/usb/core/usb.c
> > +++ b/drivers/usb/core/usb.c
> > @@ -925,7 +925,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
> >  			goto error;
> >  		} else {
> >  			dev->have_langid = -1;
> > -			dev->string_langid = tbuf[2] | (tbuf[3] << 8);
> > +			dev->string_langid = le16_to_cpu(*((__le16 *)&buf[2]));
> 
> You also changed from tbuf to buf. Is this intentional?
Good catch,

No this is not intentional it should still be `tbuf` here, `buf` name
must be used when applying patch number 6, here it will cause an error
as buf is a pointer the output string not the result of the usb request.

Jules

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-10-14 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  8:14 [PATCH 1/6] usb: hub: Use more accurate struct name Jules Maselbas
2019-10-10  8:14 ` [PATCH 2/6] usb: hub: Only clear port reset status if set Jules Maselbas
2019-10-10  8:15 ` [PATCH 3/6] usb: string: Use dma_alloc instead of a local buffer Jules Maselbas
2019-10-10  8:15 ` [PATCH 4/6] usb: string: Use le16_to_cpu for langid Jules Maselbas
2019-10-10 20:41   ` Andrey Smirnov
2019-10-14 11:42   ` Sascha Hauer
2019-10-14 15:09     ` Jules Maselbas [this message]
2019-10-10  8:15 ` [PATCH 5/6] usb: string: size_t is unsigned Jules Maselbas
2019-10-10  8:15 ` [PATCH 6/6] usb: string: Minor changes Jules Maselbas

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=20191014150954.dc7kyboblvlpvswm@tellis.lin.mbt.kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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