linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [arm:cex7 95/97] drivers/net/phy/qsfp.c:1299:31: warning: comparison of constant '8' with boolean expression is always false
@ 2020-02-04 20:29 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-02-04 20:29 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-arm-kernel

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

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head:   6a610808ba2cfe6ac91578e8b41a1237b897f8ad
commit: f5ceee4a2bc77dfe25bb22e580eb8c442b5ec671 [95/97] net: add qsfp support                              [*experimental*]
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout f5ceee4a2bc77dfe25bb22e580eb8c442b5ec671
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=xtensa 

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

All warnings (new ones prefixed by >>):

   drivers/net/phy/qsfp.c: In function 'qsfp_sm_power_up':
>> drivers/net/phy/qsfp.c:1299:31: warning: comparison of constant '8' with boolean expression is always false [-Wbool-compare]
     if (qsfp->module_power_class >= 8)
                                  ^~

vim +/8 +1299 drivers/net/phy/qsfp.c

  1292	
  1293	static int qsfp_sm_power_up(struct qsfp *qsfp)
  1294	{
  1295		int ret;
  1296		u8 val;
  1297	
  1298		val = SFF8X36_CTRL_93_POWER_ORIDE;
> 1299		if (qsfp->module_power_class >= 8)
  1300			val |= SFF8636_CTRL_93_POWER_CLS8;
  1301		if (qsfp->module_power_mW >= 1500u)
  1302			val |= SFF8636_CTRL_93_POWER_CLS5_7;
  1303	
  1304		ret = qsfp_set_power(qsfp, val);
  1305		if (ret < 0)
  1306			qsfp_sm_next(qsfp, SFP_S_ERROR, 0);
  1307		else
  1308			qsfp_sm_next(qsfp, SFP_S_WPOWER, T_OFF_PDOWN);
  1309	
  1310		return 1;
  1311	}
  1312	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60609 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-04 20:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-04 20:29 [arm:cex7 95/97] drivers/net/phy/qsfp.c:1299:31: warning: comparison of constant '8' with boolean expression is always false kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).