public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: remove unnecessary packed attributes
Date: Thu, 30 Aug 2012 17:41:21 +0200	[thread overview]
Message-ID: <1346341281-12923-1-git-send-email-dev@lynxeye.de> (raw)

We don't actually need to pack those structs, as they
are not used to do actual hardware access.

This avoids some unaligned accesses and therefore makes
the EHCI stack work on ARMv7 without compiler workarounds.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/usb/host/ehci-hcd.c | 2 +-
 include/usb.h               | 2 +-
 2 Dateien ge?ndert, 2 Zeilen hinzugef?gt(+), 2 Zeilen entfernt(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 18b4bc6..2f4fa5e 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -45,7 +45,7 @@ static struct descriptor {
 	struct usb_linux_config_descriptor config;
 	struct usb_linux_interface_descriptor interface;
 	struct usb_endpoint_descriptor endpoint;
-}  __attribute__ ((packed)) descriptor = {
+} descriptor = {
 	{
 		0x8,		/* bDescLength */
 		0x29,		/* bDescriptorType: hub descriptor */
diff --git a/include/usb.h b/include/usb.h
index ba3d169..63730ee 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -369,7 +369,7 @@ struct usb_hub_descriptor {
 	unsigned char  PortPowerCtrlMask[(USB_MAXCHILDREN+1+7)/8];
 	/* DeviceRemovable and PortPwrCtrlMask want to be variable-length
 	   bitmaps that hold max 255 entries. (bit0 is ignored) */
-} __attribute__ ((packed));
+};
 
 
 struct usb_hub_device {
-- 
1.7.11.4

             reply	other threads:[~2012-08-30 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 15:41 Lucas Stach [this message]
2012-08-30 15:49 ` [U-Boot] [PATCH] usb: remove unnecessary packed attributes Marek Vasut
2012-08-30 20:59   ` Marek Vasut
2012-08-30 21:42     ` Lucas Stach
2012-08-30 21:56       ` 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=1346341281-12923-1-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.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