ionic: clarify boolean precedence
authorShannon Nelson <snelson@pensando.io>
Tue, 1 Sep 2020 18:20:24 +0000 (11:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2020 22:47:01 +0000 (15:47 -0700)
Add parenthesis to clarify a boolean usage.

Pointed out in https://lore.kernel.org/lkml/202008060413.VgrMuqLJ%25lkp@intel.com/

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

index 00aad71..0d14659 100644 (file)
@@ -298,8 +298,8 @@ static void ionic_get_pauseparam(struct net_device *netdev,
 
        pause_type = lif->ionic->idev.port_info->config.pause_type;
        if (pause_type) {
-               pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
-               pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
+               pause->rx_pause = (pause_type & IONIC_PAUSE_F_RX) ? 1 : 0;
+               pause->tx_pause = (pause_type & IONIC_PAUSE_F_TX) ? 1 : 0;
        }
 }