CC: [email protected] BCC: [email protected] CC: Intel Wired LAN <[email protected]> CC: [email protected] TO: "Russell King (Oracle)" <[email protected]> CC: Jakub Kicinski <[email protected]> CC: Andrew Lunn <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 100GbE head: 3d5985a185e6abfc0b38ed187819016a79eca864 commit: 9ae1ef4b1634547d7ab7d15a9ffd48df8ce6883c [131/215] net: sfp: use %pe for printing errors :::::: branch date: 10 hours ago :::::: commit date: 24 hours ago config: m68k-randconfig-m031-20220304 (https://download.01.org/0day-ci/archive/20220304/[email protected]/config) compiler: m68k-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: drivers/net/phy/sfp.c:473 sfp_soft_get_state() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:1713 sfp_sm_mod_hpower() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:1797 sfp_cotsworks_fixup_check() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:1830 sfp_sm_mod_probe() warn: passing zero to 'ERR_PTR' Old smatch warnings: drivers/net/phy/sfp.c:1731 sfp_sm_mod_hpower() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:1857 sfp_sm_mod_probe() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:1906 sfp_sm_mod_probe() warn: passing zero to 'ERR_PTR' drivers/net/phy/sfp.c:2505 sfp_probe() warn: passing a valid pointer to 'PTR_ERR' vim +/ERR_PTR +473 drivers/net/phy/sfp.c 73970055450eebc Russell King 2017-07-25 459 f3c9a666b28572b Russell King 2019-11-20 460 static unsigned int sfp_soft_get_state(struct sfp *sfp) 73970055450eebc Russell King 2017-07-25 461 { f3c9a666b28572b Russell King 2019-11-20 462 unsigned int state = 0; f3c9a666b28572b Russell King 2019-11-20 463 u8 status; 0dea4d039a7fdd9 Russell King 2019-12-17 464 int ret; f3c9a666b28572b Russell King 2019-11-20 465 0dea4d039a7fdd9 Russell King 2019-12-17 466 ret = sfp_read(sfp, true, SFP_STATUS, &status, sizeof(status)); 0dea4d039a7fdd9 Russell King 2019-12-17 467 if (ret == sizeof(status)) { f3c9a666b28572b Russell King 2019-11-20 468 if (status & SFP_STATUS_RX_LOS) f3c9a666b28572b Russell King 2019-11-20 469 state |= SFP_F_LOS; f3c9a666b28572b Russell King 2019-11-20 470 if (status & SFP_STATUS_TX_FAULT) f3c9a666b28572b Russell King 2019-11-20 471 state |= SFP_F_TX_FAULT; 0dea4d039a7fdd9 Russell King 2019-12-17 472 } else { 0dea4d039a7fdd9 Russell King 2019-12-17 @473 dev_err_ratelimited(sfp->dev, 9ae1ef4b1634547 Russell King (Oracle 2022-03-01 474) "failed to read SFP soft status: %pe\n", 9ae1ef4b1634547 Russell King (Oracle 2022-03-01 475) ERR_PTR(ret)); 0dea4d039a7fdd9 Russell King 2019-12-17 476 /* Preserve the current state */ 0dea4d039a7fdd9 Russell King 2019-12-17 477 state = sfp->state; 73970055450eebc Russell King 2017-07-25 478 } 73970055450eebc Russell King 2017-07-25 479 f3c9a666b28572b Russell King 2019-11-20 480 return state & sfp->state_soft_mask; f3c9a666b28572b Russell King 2019-11-20 481 } f3c9a666b28572b Russell King 2019-11-20 482 :::::: The code at line 473 was first introduced by commit :::::: 0dea4d039a7fdd97790a71da37c1ce67a5b52769 net: sfp: report error on failure to read sfp soft status :::::: TO: Russell King <[email protected]> :::::: CC: David S. Miller <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
