All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and
@ 2020-08-05 20:02 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-05 20:02 UTC (permalink / raw)
  To: Shannon Nelson; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2324d50d051ec0f14a548e78554fb02513d6dcef
commit: 4d03e00a21409f63668349ae4123f5707d9a28cf ionic: Add initial ethtool support
date:   11 months ago
compiler: ia64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
                                                     ^
   drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:251:51: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
                                                     ^
--
>> drivers/net/geneve.c:898:46: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
                                                ^

vim +250 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

   239	
   240	static void ionic_get_pauseparam(struct net_device *netdev,
   241					 struct ethtool_pauseparam *pause)
   242	{
   243		struct ionic_lif *lif = netdev_priv(netdev);
   244		u8 pause_type;
   245	
   246		pause->autoneg = 0;
   247	
   248		pause_type = lif->ionic->idev.port_info->config.pause_type;
   249		if (pause_type) {
 > 250			pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
   251			pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
   252		}
   253	}
   254	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and
@ 2020-08-05 20:02 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-05 20:02 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2324d50d051ec0f14a548e78554fb02513d6dcef
commit: 4d03e00a21409f63668349ae4123f5707d9a28cf ionic: Add initial ethtool support
date:   11 months ago
compiler: ia64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
                                                     ^
   drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:251:51: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
                                                     ^
--
>> drivers/net/geneve.c:898:46: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
     df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
                                                ^

vim +250 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

   239	
   240	static void ionic_get_pauseparam(struct net_device *netdev,
   241					 struct ethtool_pauseparam *pause)
   242	{
   243		struct ionic_lif *lif = netdev_priv(netdev);
   244		u8 pause_type;
   245	
   246		pause->autoneg = 0;
   247	
   248		pause_type = lif->ionic->idev.port_info->config.pause_type;
   249		if (pause_type) {
 > 250			pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
   251			pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
   252		}
   253	}
   254	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-05 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 20:02 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and kernel test robot
2020-08-05 20:02 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.