[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdRNGNscyONgVsMqw9F_DQ_noK5dE4d8mexq=4t_2xTXg@mail.gmail.com>
Date: Wed, 14 Apr 2021 17:53:42 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: kernel test robot <lkp@...el.com>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, kbuild-all@...ts.01.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26:
sparse: sparse: incorrect type in argument 1 (different address spaces)
On Wed, Apr 14, 2021 at 10:21 AM kernel test robot <lkp@...el.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: eebe426d32e1a10ac7c35f8ffab5f818c32a2454
> commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation)
> date: 8 months ago
> config: alpha-randconfig-s032-20210414 (attached as .config)
> compiler: alpha-linux-gcc (GCC) 9.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.3-280-g2cd6d34e-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
I believe after my patch series [1] at least part of this will be
gone. Can you confirm?
[1]: https://lore.kernel.org/netdev/20210325173412.82911-1-andriy.shevchenko@linux.intel.com/T/#u
> sparse warnings: (new ones prefixed by >>)
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: sparse: got unsigned int [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] uid_hi @@ got restricted __be16 [usertype] @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse: expected unsigned short [usertype] uid_hi
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: sparse: got restricted __be16 [usertype]
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned int [usertype] uid_lo @@ got restricted __be32 [usertype] @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse: expected unsigned int [usertype] uid_lo
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: sparse: got restricted __be32 [usertype]
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned short [usertype] seqid @@ got restricted __be16 [usertype] @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse: expected unsigned short [usertype] seqid
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: sparse: got restricted __be16 [usertype]
> >> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got void *reg @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse: expected void const [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: sparse: got void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: sparse: got unsigned int [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: sparse: got unsigned int [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: sparse: got unsigned int [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: sparse: got unsigned int [noderef] __iomem *
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *reg @@ got unsigned int [noderef] __iomem * @@
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse: expected void *reg
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: sparse: got unsigned int [noderef] __iomem *
>
> vim +306 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
>
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 294
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 295 /**
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 296 * pch_gbe_wait_clr_bit - Wait to clear a bit
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 297 * @reg: Pointer of register
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 298 * @busy: Busy bit
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 299 */
> 191cc687740834 drivers/net/pch_gbe/pch_gbe_main.c stephen hemminger 2010-10-15 300 static void pch_gbe_wait_clr_bit(void *reg, u32 bit)
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 301 {
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 302 u32 tmp;
> 453ca931f51516 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 303
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 304 /* wait busy */
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 305 tmp = 1000;
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 @306 while ((ioread32(reg) & bit) && --tmp)
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 307 cpu_relax();
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 308 if (!tmp)
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 309 pr_err("Error: busy bit is not cleared\n");
> 77555ee7228234 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 310 }
> 124d770a6459be drivers/net/pch_gbe/pch_gbe_main.c Toshiharu Okada 2011-09-01 311
>
> :::::: The code at line 306 was first introduced by commit
> :::::: 77555ee7228234257957fd54daa0b69178906320 net: Add Gigabit Ethernet driver of Topcliff PCH
>
> :::::: TO: Masayuki Ohtake <masa-korg@....okisemi.com>
> :::::: CC: David S. Miller <davem@...emloft.net>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists