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: Sun, 13 Feb 2022 02:17:13 +0800 [thread overview]
Message-ID: <202202122203.55RvxnRa-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4506 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Masahiro Yamada <masahiroy@kernel.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
Hi Masahiro,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 83e396641110663d3c7bb25b9bc0c6a750359ecf
commit: ea29b20a828511de3348334e529a3d046a180416 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
date: 11 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 11 months ago
config: s390-randconfig-m031-20220212 (https://download.01.org/0day-ci/archive/20220212/202202122203.55RvxnRa-lkp(a)intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.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
next reply other threads:[~2022-02-12 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 18:17 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-08 9:37 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=202202122203.55RvxnRa-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.