lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008060413.VgrMuqLJ%lkp@intel.com>
Date:   Thu, 6 Aug 2020 04:02:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Shannon Nelson <snelson@...sando.io>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning:
 Clarify calculation precedence for '&' and

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ