carl9170 firmware: add fall through comments
authorChristian Lamparter <chunkeey@googlemail.com>
Wed, 3 May 2017 12:12:22 +0000 (14:12 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Wed, 3 May 2017 12:12:22 +0000 (14:12 +0200)
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 <chunkeey@googlemail.com>
carlfw/include/wl.h
carlfw/src/timer.c
carlfw/src/wlanrx.c
carlfw/usb/usb.c

index 5def1cf77eb4c1298010a68668a275630a134cc3..8499ca2d41682b443b42ff6f502fc41440f69011 100644 (file)
@@ -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;
index 9b625301ca602504e98b951006e2e6f8b200337a..4a4b38fabf6df08094f76f318275988375151d89 100644 (file)
@@ -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;
        }
index 3ff9d54a03db8175d280364096e3d8b8edf1cfce..9f58241cdd5f96f49c34020cee61647dec652019 100644 (file)
@@ -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;
index eb57da14aaad0f00c1648d68d6aa07a0406795ef..aedf30d1404830bb989e9ba8caeb4a459aee5fc1 100644 (file)
@@ -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;