public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adrian Cox <adrian@humboldt.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint
Date: Mon, 7 Apr 2014 10:56:48 +0100 (BST)	[thread overview]
Message-ID: <3392231.3254.1396864604431.JavaMail.adrian@Gurnard> (raw)
In-Reply-To: <20140406111746.25D3538099A@gemini.denx.de>


> From: "Wolfgang Denk" <wd@denx.de>

> I agree that the code is wrong and needs fixing.  data->new is an
> uint8_t pointer, so taking the size of the pointer is obviously
> wrong.  But what you fix here is not the only place where
> sizeof(data->new) is used, so this patch fixes part of the problem at
> best.

I can't find any other instances of sizeof in usb_kbd.c. Is this a broader problem in the USB stack?

> Can you please try out if the following extended version f the patch
> works and fixes your problem?  You will note that I removed all
> occurrences of this magic number 8 by replacing it with
> USB_KBD_PDATA_SIZE  so the could should also be easier to read.

I've tested your extended patch, and it does fix the problem for me. I agree that adding USB_KBD_PDATA_SIZE
does improve readability.

Thanks and regards,
Adrian Cox

  reply	other threads:[~2014-04-07  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13471364.2645.1396715619854.JavaMail.adrian@Gurnard>
2014-04-05 16:36 ` [U-Boot] [PATCH] Fix USB keyboard polling via control endpoint Adrian Cox
2014-04-06 11:17   ` Wolfgang Denk
2014-04-07  9:56     ` Adrian Cox [this message]
2014-04-07 16:59       ` Wolfgang Denk
2014-04-10  8:12     ` Marek Vasut
2014-04-10  8:49       ` Adrian Cox
2014-04-10  9:04         ` Marek Vasut
2014-04-10 10:15       ` Wolfgang Denk
2014-04-10 12:33         ` Marek Vasut
2014-04-10 13:02           ` [U-Boot] [PATCH v3] " Adrian Cox
2014-04-10 14:14             ` Marek Vasut

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=3392231.3254.1396864604431.JavaMail.adrian@Gurnard \
    --to=adrian@humboldt.co.uk \
    --cc=u-boot@lists.denx.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