drivers/net/ethernet/xilinx/ll_temac_main.c:93:2: warning: Non-boolean value returned from function returning bool

From: kernel test robot
Date: Wed Aug 05 2020 - 23:05:03 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fffe3ae0ee84e25d2befe2ae59bc32aa2b6bc77b
commit: e8b6c54f6d57822e228027d41a1edb317034a08c net: xilinx: temac: Relax Kconfig dependencies
date: 4 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@xxxxxxxxx>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/xilinx/ll_temac_main.c:93:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return temac_ior(lp, XTE_RDY0_OFFSET) & XTE_RDY0_HARD_ACS_RDY_MASK;
^
>> drivers/net/ethernet/xilinx/ll_temac_main.c:469:44: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK);
^
drivers/net/ethernet/xilinx/ll_temac_main.c:505:8: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
& XTE_AFM_EPPRM_MASK) {
^
drivers/net/ethernet/xilinx/ll_temac_main.c:579:10: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
.m_or =XTE_AFM_EPPRM_MASK,
^
drivers/net/ethernet/xilinx/ll_temac_main.c:637:44: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
temac_indirect_out32(lp, XTE_RXC1_OFFSET, XTE_RXC1_RXRST_MASK);
^
drivers/net/ethernet/xilinx/ll_temac_main.c:639:52: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
while (temac_indirect_in32(lp, XTE_RXC1_OFFSET) & XTE_RXC1_RXRST_MASK) {
^
drivers/net/ethernet/xilinx/ll_temac_main.c:649:43: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
temac_indirect_out32(lp, XTE_TXC_OFFSET, XTE_TXC_TXRST_MASK);
^
drivers/net/ethernet/xilinx/ll_temac_main.c:651:51: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
while (temac_indirect_in32(lp, XTE_TXC_OFFSET) & XTE_TXC_TXRST_MASK) {
^
drivers/net/ethernet/xilinx/ll_temac_main.c:725:33: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
case SPEED_1000: mii_speed |= XTE_EMCFG_LINKSPD_1000; break;
^

vim +93 drivers/net/ethernet/xilinx/ll_temac_main.c

92744989533cbe drivers/net/ll_temac_main.c Grant Likely 2009-04-25 90
1bd33bf0fe6d30 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 91 static bool hard_acs_rdy(struct temac_local *lp)
1bd33bf0fe6d30 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 92 {
1bd33bf0fe6d30 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 @93 return temac_ior(lp, XTE_RDY0_OFFSET) & XTE_RDY0_HARD_ACS_RDY_MASK;
1bd33bf0fe6d30 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 94 }
1bd33bf0fe6d30 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 95

:::::: The code at line 93 was first introduced by commit
:::::: 1bd33bf0fe6d3012410db0302187199871b510a0 net: ll_temac: Prepare indirect register access for multicast support

:::::: TO: Esben Haabendal <esben@xxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

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