From: Christian Lamparter Date: Wed, 3 May 2017 12:12:22 +0000 (+0200) Subject: carl9170 firmware: add fall through comments X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=f99b6fd51bf8429eaad357ac9c7149a92f719628;p=carl9170fw.git 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 --- 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;