[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006211709.hxHhenC8%lkp@intel.com>
Date: Sun, 21 Jun 2020 17:05:20 +0800
From: kernel test robot <lkp@...el.com>
To: Stephen Boyd <sboyd@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: drivers/clk/clk-divider.c:39:17: sparse: sparse: incorrect type in
argument 1 (different base types)
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 64677779e8962c20b580b471790fe42367750599
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
date: 7 weeks ago
config: alpha-randconfig-s032-20200621 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc2-13-gc59158c8-dirty
git checkout bbd7ffdbef6888459f301c5889f3b14ada38b913
# save the attached .config to linux build tree
make W=1 C=1 ARCH=alpha CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-divider.c:31:24: sparse: sparse: cast to restricted __be32
>> drivers/clk/clk-divider.c:39:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
>> drivers/clk/clk-divider.c:39:17: sparse: expected unsigned int [usertype]
drivers/clk/clk-divider.c:39:17: sparse: got restricted __be32 [usertype]
--
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
>> drivers/clk/clk-gate.c:37:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
>> drivers/clk/clk-gate.c:37:17: sparse: expected unsigned int [usertype]
drivers/clk/clk-gate.c:37:17: sparse: got restricted __be32 [usertype]
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-gate.c:29:24: sparse: sparse: cast to restricted __be32
--
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-multiplier.c:18:24: sparse: sparse: cast to restricted __be32
>> drivers/clk/clk-multiplier.c:26:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
>> drivers/clk/clk-multiplier.c:26:17: sparse: expected unsigned int [usertype]
drivers/clk/clk-multiplier.c:26:17: sparse: got restricted __be32 [usertype]
--
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-mux.c:29:24: sparse: sparse: cast to restricted __be32
>> drivers/clk/clk-mux.c:37:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
>> drivers/clk/clk-mux.c:37:17: sparse: expected unsigned int [usertype]
drivers/clk/clk-mux.c:37:17: sparse: got restricted __be32 [usertype]
--
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
drivers/clk/clk-fractional-divider.c:20:24: sparse: sparse: cast to restricted __be32
>> drivers/clk/clk-fractional-divider.c:28:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
>> drivers/clk/clk-fractional-divider.c:28:17: sparse: expected unsigned int [usertype]
drivers/clk/clk-fractional-divider.c:28:17: sparse: got restricted __be32 [usertype]
vim +39 drivers/clk/clk-divider.c
9d9f78ed9af0e4 Mike Turquette 2012-03-15 17
9d9f78ed9af0e4 Mike Turquette 2012-03-15 18 /*
9d9f78ed9af0e4 Mike Turquette 2012-03-15 19 * DOC: basic adjustable divider clock that cannot gate
9d9f78ed9af0e4 Mike Turquette 2012-03-15 20 *
9d9f78ed9af0e4 Mike Turquette 2012-03-15 21 * Traits of this clock:
9d9f78ed9af0e4 Mike Turquette 2012-03-15 22 * prepare - clk_prepare only ensures that parents are prepared
9d9f78ed9af0e4 Mike Turquette 2012-03-15 23 * enable - clk_enable only ensures that parents are enabled
9556f9dad8f576 Brian Norris 2015-04-13 24 * rate - rate is adjustable. clk->rate = ceiling(parent->rate / divisor)
9d9f78ed9af0e4 Mike Turquette 2012-03-15 25 * parent - fixed parent. No clk_set_parent support
9d9f78ed9af0e4 Mike Turquette 2012-03-15 26 */
9d9f78ed9af0e4 Mike Turquette 2012-03-15 27
434d69fad63b44 Jonas Gorski 2019-04-18 28 static inline u32 clk_div_readl(struct clk_divider *divider)
434d69fad63b44 Jonas Gorski 2019-04-18 29 {
434d69fad63b44 Jonas Gorski 2019-04-18 30 if (divider->flags & CLK_DIVIDER_BIG_ENDIAN)
434d69fad63b44 Jonas Gorski 2019-04-18 @31 return ioread32be(divider->reg);
434d69fad63b44 Jonas Gorski 2019-04-18 32
5834fd75e62366 Jonas Gorski 2019-04-18 33 return readl(divider->reg);
434d69fad63b44 Jonas Gorski 2019-04-18 34 }
434d69fad63b44 Jonas Gorski 2019-04-18 35
434d69fad63b44 Jonas Gorski 2019-04-18 36 static inline void clk_div_writel(struct clk_divider *divider, u32 val)
434d69fad63b44 Jonas Gorski 2019-04-18 37 {
434d69fad63b44 Jonas Gorski 2019-04-18 38 if (divider->flags & CLK_DIVIDER_BIG_ENDIAN)
434d69fad63b44 Jonas Gorski 2019-04-18 @39 iowrite32be(val, divider->reg);
434d69fad63b44 Jonas Gorski 2019-04-18 40 else
5834fd75e62366 Jonas Gorski 2019-04-18 41 writel(val, divider->reg);
434d69fad63b44 Jonas Gorski 2019-04-18 42 }
434d69fad63b44 Jonas Gorski 2019-04-18 43
:::::: The code at line 39 was first introduced by commit
:::::: 434d69fad63b443d7afc8aa99264359c9b4e2d3a clk: divider: add explicit big endian support
:::::: TO: Jonas Gorski <jonas.gorski@...il.com>
:::::: CC: Stephen Boyd <sboyd@...nel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (27740 bytes)
Powered by blists - more mailing lists