From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] usb:composite: use memcpy to avoid unaligned access
Date: Tue, 25 Jun 2013 06:20:53 +0200 [thread overview]
Message-ID: <51C91AA5.3010008@denx.de> (raw)
In-Reply-To: <1365595673-23272-3-git-send-email-p.wilczek@samsung.com>
Hello Prafulla,
just saw, that the below patch is delegated to you:
(added also Marek Vasut to cc, as he is the usb maintainer)
Am 10.04.2013 14:07, schrieb Piotr Wilczek:
> This patch memcpy is used instead of an assignment to
> avoid unaligned access execption on some ARM platforms.
>
> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> CC: Lukasz Majewski <l.majewski@samsung.com>
> ---
> drivers/usb/gadget/composite.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
> index 2c5600e..0716e52 100644
> --- a/drivers/usb/gadget/composite.c
> +++ b/drivers/usb/gadget/composite.c
> @@ -997,7 +997,8 @@ static int composite_bind(struct usb_gadget *gadget)
> if (status < 0)
> goto fail;
>
> - cdev->desc = *composite->dev;
> + memcpy(&cdev->desc, composite->dev,
> + sizeof(struct usb_device_descriptor));
> cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
>
> debug("%s: ready\n", composite->name);
>
This fixes a bug... do you plan to work it in for this release? Or
are there some issues with this patch?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2013-06-25 4:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 12:07 [U-Boot] [PATCH 0/4] Enable 'ums' command on Trats2 board Piotr Wilczek
2013-04-10 12:07 ` [U-Boot] [PATCH 1/4] driver:usb:s3c_udc: add support for Exynos4x12 Piotr Wilczek
2013-04-10 12:07 ` [U-Boot] [PATCH 2/4] usb:composite: use memcpy to avoid unaligned access Piotr Wilczek
2013-05-16 13:51 ` Heiko Schocher
2013-06-25 4:20 ` Heiko Schocher [this message]
2013-06-26 11:32 ` Marek Vasut
2013-04-10 12:07 ` [U-Boot] [PATCH 3/4] pmic: max77693: add defines for safeout 1 and 2 Piotr Wilczek
2013-04-10 12:07 ` [U-Boot] [PATCH 4/4] trats2: enable ums support on Trats2 Piotr Wilczek
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=51C91AA5.3010008@denx.de \
--to=hs@denx.de \
--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