From f99b6fd51bf8429eaad357ac9c7149a92f719628 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 3 May 2017 14:12:22 +0200 Subject: [PATCH] carl9170 firmware: add fall through comments GCC 7.1.0 adds -Wimplicit-fallthrough if -Wextra is set. In order to suppress the warning, a fallthrough comment has to be added at the right place. Signed-off-by: Christian Lamparter --- carlfw/include/wl.h | 3 ++- carlfw/src/timer.c | 3 +++ carlfw/src/wlanrx.c | 2 +- carlfw/usb/usb.c | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/carlfw/include/wl.h b/carlfw/include/wl.h index 5def1cf..8499ca2 100644 --- a/carlfw/include/wl.h +++ b/carlfw/include/wl.h @@ -188,8 +188,9 @@ static inline __inline unsigned int ar9170_get_rx_mpdu_len(struct dma_desc *desc break; case AR9170_RX_STATUS_MPDU_SINGLE: + /* MPDU single has both */ mpdu_len -= sizeof(struct ar9170_rx_phystatus); - + /* fall through */ case AR9170_RX_STATUS_MPDU_FIRST: mpdu_len -= sizeof(struct ar9170_rx_head); break; diff --git a/carlfw/src/timer.c b/carlfw/src/timer.c index 9b62530..4a4b38f 100644 --- a/carlfw/src/timer.c +++ b/carlfw/src/timer.c @@ -64,9 +64,12 @@ void clock_set(enum cpu_clock_t clock_, bool on) switch (clock_) { case AHB_20_22MHZ: fw.ticks_per_usec >>= 1; + /* fall through */ case AHB_40MHZ_OSC: + /* fall through */ case AHB_40_44MHZ: fw.ticks_per_usec >>= 1; + /* fall through */ case AHB_80_88MHZ: break; } diff --git a/carlfw/src/wlanrx.c b/carlfw/src/wlanrx.c index 3ff9d54..9f58241 100644 --- a/carlfw/src/wlanrx.c +++ b/carlfw/src/wlanrx.c @@ -137,7 +137,7 @@ static unsigned int wlan_rx_filter(struct dma_desc *desc) */ break; } - /* otherwise fall through */ + /* fall through */ default: rx_filter |= CARL9170_RX_FILTER_CTL_OTHER; break; diff --git a/carlfw/usb/usb.c b/carlfw/usb/usb.c index eb57da1..aedf30d 100644 --- a/carlfw/usb/usb.c +++ b/carlfw/usb/usb.c @@ -515,6 +515,7 @@ static int usb_set_configuration(const struct usb_ctrlrequest *ctrl) /* Disable Device */ andb(AR9170_USB_REG_DEVICE_ADDRESS, (uint8_t) ~(AR9170_USB_DEVICE_ADDRESS_CONFIGURE)); + /* fall through */ case 1: fw.usb.config = config; -- 2.31.1