summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-11-08 10:23:44 +0100
committerCommit Bot <commit-bot@chromium.org>2019-11-09 11:57:09 +0000
commita77d3db306dcf1a29f8c073922d3f104a074928d (patch)
tree72a6396d7ef06c2d30471e8da7553c5f3ba67bc5
parentbd2b21346ceb7bdd736efcd83f444c1d7f84ee7d (diff)
downloadchrome-ec-a77d3db306dcf1a29f8c073922d3f104a074928d.tar.gz
chip/stm32: reinstate static and use EC idiom for alignment
During my bug hunt I had to remove the static attribute. While that wasn't part of the fix, it slipped through. Also, Daisuke pointed out that the standard idiom in the EC codebase is __aligned instead of using the full __attribute__ statement, so switch over. BUG=none TEST=sweetberry gcc8 build still runs Change-Id: I106a8a2df3d6b56bfaba9819228ea7913029f707 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1905767 Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
-rw-r--r--chip/stm32/usb_dwc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/stm32/usb_dwc.c b/chip/stm32/usb_dwc.c
index 25c6f091a2..f4ee89f1f0 100644
--- a/chip/stm32/usb_dwc.c
+++ b/chip/stm32/usb_dwc.c
@@ -146,14 +146,14 @@ static enum table_case decode_table_10_7(uint32_t doepint)
/* For STATUS/OUT: Use two DMA descriptors, each with one-packet buffers */
#define NUM_OUT_BUFFERS 2
-static uint8_t __attribute__((aligned(4))) ep0_setup_buf[USB_MAX_PACKET_SIZE];
+static uint8_t __aligned(4) ep0_setup_buf[USB_MAX_PACKET_SIZE];
/* For IN: Several DMA descriptors, all pointing into one large buffer, so that
* we can return the configuration descriptor as one big blob.
*/
#define NUM_IN_PACKETS_AT_ONCE 4
#define IN_BUF_SIZE (NUM_IN_PACKETS_AT_ONCE * USB_MAX_PACKET_SIZE)
-uint8_t __attribute__((aligned(4))) ep0_in_buf[IN_BUF_SIZE];
+static uint8_t __aligned(4) ep0_in_buf[IN_BUF_SIZE];
struct dwc_usb_ep ep0_ctl = {
.max_packet = USB_MAX_PACKET_SIZE,