mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'
Date: Wed, 12 Aug 2020 11:09:22 +0800	[thread overview]
Message-ID: <202008121120.vk5L4TOM%lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2020-08-12  3:10 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=202008121120.vk5L4TOM%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hkallweit1@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®