All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/smsc/smc91x.c:2128 smc_request_attrib() warn: should '(64 * 1024) << (lp->io_shift)' be a 64 bit type?
Date: Thu, 08 Jul 2021 17:37:18 +0800	[thread overview]
Message-ID: <202107081701.D1vDxa8L-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Andrew Lunn <andrew@lunn.ch>
CC: Jakub Kicinski <kuba@kernel.org>

Hi Andrew,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e9f1cbc0c4114880090c7a578117d3b9cf184ad4
commit: 7958ba7e6273a02f49432a2506958d0f59b5b8da drivers: net: smsc: Add COMPILE_TEST support
date:   8 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 8 months ago
config: ia64-randconfig-m031-20210707 (attached as .config)
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/ethernet/smsc/smc91x.c:2128 smc_request_attrib() warn: should '(64 * 1024) << (lp->io_shift)' be a 64 bit type?
drivers/net/ethernet/smsc/smc91x.c:2141 smc_release_attrib() warn: should '(64 * 1024) << (lp->io_shift)' be a 64 bit type?
drivers/net/ethernet/smsc/smc91x.c:2344 smc_drv_probe() warn: should '16 << (lp->io_shift)' be a 64 bit type?
drivers/net/ethernet/smsc/smc91x.c:2434 smc_drv_remove() warn: should '16 << (lp->io_shift)' be a 64 bit type?

Old smatch warnings:
drivers/net/ethernet/smsc/smc91x.c:2403 smc_drv_probe() warn: should '16 << (lp->io_shift)' be a 64 bit type?

vim +2128 drivers/net/ethernet/smsc/smc91x.c

^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2118  
159198862adad7 drivers/net/smc91x.c Eric Miao       2008-06-24  2119  static int smc_request_attrib(struct platform_device *pdev,
159198862adad7 drivers/net/smc91x.c Eric Miao       2008-06-24  2120  			      struct net_device *ndev)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2121  {
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2122  	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
55c8eb6c8eaa50 drivers/net/smc91x.c David S. Miller 2008-11-03  2123  	struct smc_local *lp __maybe_unused = netdev_priv(ndev);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2124  
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2125  	if (!res)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2126  		return 0;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2127  
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16 @2128  	if (!request_mem_region(res->start, ATTRIB_SIZE, CARDNAME))
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2129  		return -EBUSY;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2130  
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2131  	return 0;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2132  }
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2133  
159198862adad7 drivers/net/smc91x.c Eric Miao       2008-06-24  2134  static void smc_release_attrib(struct platform_device *pdev,
159198862adad7 drivers/net/smc91x.c Eric Miao       2008-06-24  2135  			       struct net_device *ndev)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2136  {
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2137  	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
55c8eb6c8eaa50 drivers/net/smc91x.c David S. Miller 2008-11-03  2138  	struct smc_local *lp __maybe_unused = netdev_priv(ndev);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2139  
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2140  	if (res)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16 @2141  		release_mem_region(res->start, ATTRIB_SIZE);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2142  }
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds  2005-04-16  2143  

:::::: The code at line 2128 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

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

             reply	other threads:[~2021-07-08  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  9:37 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-12 18:17 drivers/net/ethernet/smsc/smc91x.c:2128 smc_request_attrib() warn: should '(64 * 1024) << (lp->io_shift)' be a 64 bit type? kernel test robot
2021-05-14  9:27 kernel test robot

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=202107081701.D1vDxa8L-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.