mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'
@ 2020-08-12  3:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-12  3:09 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: kbuild-all, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 2815b30535a0613ee07d477d0c628100f40b6059 r8169: merge scale for tx and rx irq coalescing
date:   3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-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>

New smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'

Old smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1837 rtl_get_coalesce() warn: passing a valid pointer to 'PTR_ERR'

vim +/PTR_ERR +1872 drivers/net/ethernet/realtek/r8169_main.c

  1862	
  1863	/* choose appropriate scale factor and CPlusCmd[0:1] for (speed, nsec) */
  1864	static int rtl_coalesce_choose_scale(struct rtl8169_private *tp, u32 nsec,
  1865					     u16 *cp01)
  1866	{
  1867		const struct rtl_coalesce_info *ci;
  1868		u16 i;
  1869	
  1870		ci = rtl_coalesce_info(tp);
  1871		if (IS_ERR(ci))
> 1872			return PTR_ERR(ci);
  1873	
  1874		for (i = 0; i < 4; i++) {
  1875			if (nsec <= ci->scale_nsecs[i] * RTL_COALESCE_T_MAX) {
  1876				*cp01 = i;
  1877				return ci->scale_nsecs[i];
  1878			}
  1879		}
  1880	
  1881		return -EINVAL;
  1882	}
  1883	

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

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

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

only message in thread, other threads:[~2020-08-12  3:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  3:09 drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®