]> git.baikalelectronics.ru Git - kernel.git/commitdiff
sfc: fix W=1 warnings in efx_farch_handle_rx_not_ok
authorEdward Cree <ecree@solarflare.com>
Fri, 28 Aug 2020 17:50:02 +0000 (18:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2020 19:28:50 +0000 (12:28 -0700)
Some of these RX-event flags aren't used at all, so remove them.
Others are used only #ifdef DEBUG to log a message; suppress the
 unused-var warnings #ifndef DEBUG with a void cast.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/farch.c

index d07eeaad9bdffdefb2093e3f2929c66c84b469b2..aff2974e66df376804c9211fb72e7b353e0f5397 100644 (file)
@@ -863,13 +863,8 @@ static u16 efx_farch_handle_rx_not_ok(struct efx_rx_queue *rx_queue,
        bool rx_ev_tcp_udp_chksum_err, rx_ev_eth_crc_err;
        bool rx_ev_frm_trunc, rx_ev_tobe_disc;
        bool rx_ev_other_err, rx_ev_pause_frm;
-       bool rx_ev_hdr_type, rx_ev_mcast_pkt;
-       unsigned rx_ev_pkt_type;
 
-       rx_ev_hdr_type = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_HDR_TYPE);
-       rx_ev_mcast_pkt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_MCAST_PKT);
        rx_ev_tobe_disc = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_TOBE_DISC);
-       rx_ev_pkt_type = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_PKT_TYPE);
        rx_ev_buf_owner_id_err = EFX_QWORD_FIELD(*event,
                                                 FSF_AZ_RX_EV_BUF_OWNER_ID_ERR);
        rx_ev_ip_hdr_chksum_err = EFX_QWORD_FIELD(*event,
@@ -918,6 +913,8 @@ static u16 efx_farch_handle_rx_not_ok(struct efx_rx_queue *rx_queue,
                          rx_ev_tobe_disc ? " [TOBE_DISC]" : "",
                          rx_ev_pause_frm ? " [PAUSE]" : "");
        }
+#else
+       (void) rx_ev_other_err;
 #endif
 
        if (efx->net_dev->features & NETIF_F_RXALL)