gcc5 warns about (!x == y) assuming !(x == y) may be meant, and the
driver's Makefile enforcing -Werror results in this failing the build.

Reported-by: Jiri Slaby <jsl...@suse.cz>
Signed-off-by: Jan Beulich <jbeul...@suse.com>

--- a/drivers/xen/sfc_netfront/falcon_event.c
+++ b/drivers/xen/sfc_netfront/falcon_event.c
@@ -110,7 +110,7 @@ ef_vi_inline int falcon_rx_check_dup(
 #endif
        BUG_ON(!QWORD_TEST_BIT(RX_EV_FRM_TRUNC, *ev));
        BUG_ON( QWORD_TEST_BIT(RX_EV_PKT_OK, *ev));
-       BUG_ON(!QWORD_GET_U(RX_EV_BYTE_CNT, *ev) == 0);
+       BUG_ON(QWORD_GET_U(RX_EV_BYTE_CNT, *ev));
        ev_out->rx_no_desc_trunc.type = EF_EVENT_TYPE_RX_NO_DESC_TRUNC;
        ev_out->rx_no_desc_trunc.q_id = q_id;
        return 1;



sfc_netfront: deal with gcc5 warning

gcc5 warns about (!x == y) assuming !(x == y) may be meant, and the
driver's Makefile enforcing -Werror results in this failing the build.

Reported-by: Jiri Slaby <jsl...@suse.cz>
Signed-off-by: Jan Beulich <jbeul...@suse.com>

--- a/drivers/xen/sfc_netfront/falcon_event.c
+++ b/drivers/xen/sfc_netfront/falcon_event.c
@@ -110,7 +110,7 @@ ef_vi_inline int falcon_rx_check_dup(
 #endif
        BUG_ON(!QWORD_TEST_BIT(RX_EV_FRM_TRUNC, *ev));
        BUG_ON( QWORD_TEST_BIT(RX_EV_PKT_OK, *ev));
-       BUG_ON(!QWORD_GET_U(RX_EV_BYTE_CNT, *ev) == 0);
+       BUG_ON(QWORD_GET_U(RX_EV_BYTE_CNT, *ev));
        ev_out->rx_no_desc_trunc.type = EF_EVENT_TYPE_RX_NO_DESC_TRUNC;
        ev_out->rx_no_desc_trunc.q_id = q_id;
        return 1;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to