public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shannon Nelson <snelson@pensando.io>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:250:51: warning: Clarify calculation precedence for '&' and
Date: Thu, 6 Aug 2020 04:02:15 +0800	[thread overview]
Message-ID: <202008060413.VgrMuqLJ%lkp@intel.com> (raw)

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

                 reply	other threads:[~2020-08-05 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202008060413.VgrMuqLJ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snelson@pensando.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox