[clk:clk-parent-rewrite 70/78] drivers/clk/sunxi-ng/ccu_mux.c:271:37: sparse: sparse: incorrect type in assignment (different base types)
From: kbuild test robot <hidden>
Date: 2019-05-03 02:45:32
Also in:
linux-clk
tree: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-parent-rewrite head: f5e93ab2421d0dd27acac9159d9c4834cd5705e7 commit: c4e54e4bc72df9c60801981f828a62de2f5707f0 [70/78] clk: sunxi-ng: Migrate to .get_parent_hw clk op reproduce: # apt-get install sparse git checkout c4e54e4bc72df9c60801981f828a62de2f5707f0 make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot <redacted> sparse warnings: (new ones prefixed by >>)
quoted
drivers/clk/sunxi-ng/ccu_mux.c:271:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char [usertype] original_index @@ got har [usertype] original_index @@ drivers/clk/sunxi-ng/ccu_mux.c:271:37: sparse: expected unsigned char [usertype] original_index drivers/clk/sunxi-ng/ccu_mux.c:271:37: sparse: got struct clk_hw * drivers/clk/sunxi-ng/ccu_mux.c:272:65: sparse: sparse: non size-preserving pointer to integer cast
vim +271 drivers/clk/sunxi-ng/ccu_mux.c
8adfb086 Chen-Yu Tsai 2016-08-25 257
8adfb086 Chen-Yu Tsai 2016-08-25 258 /*
8adfb086 Chen-Yu Tsai 2016-08-25 259 * This clock notifier is called when the frequency of the of the parent
8adfb086 Chen-Yu Tsai 2016-08-25 260 * PLL clock is to be changed. The idea is to switch the parent to a
8adfb086 Chen-Yu Tsai 2016-08-25 261 * stable clock, such as the main oscillator, while the PLL frequency
8adfb086 Chen-Yu Tsai 2016-08-25 262 * stabilizes.
8adfb086 Chen-Yu Tsai 2016-08-25 263 */
8adfb086 Chen-Yu Tsai 2016-08-25 264 static int ccu_mux_notifier_cb(struct notifier_block *nb,
8adfb086 Chen-Yu Tsai 2016-08-25 265 unsigned long event, void *data)
8adfb086 Chen-Yu Tsai 2016-08-25 266 {
8adfb086 Chen-Yu Tsai 2016-08-25 267 struct ccu_mux_nb *mux = to_ccu_mux_nb(nb);
8adfb086 Chen-Yu Tsai 2016-08-25 268 int ret = 0;
8adfb086 Chen-Yu Tsai 2016-08-25 269
8adfb086 Chen-Yu Tsai 2016-08-25 270 if (event == PRE_RATE_CHANGE) {
8adfb086 Chen-Yu Tsai 2016-08-25 @271 mux->original_index = ccu_mux_helper_get_parent(mux->common,
8adfb086 Chen-Yu Tsai 2016-08-25 @272 mux->cm);
8adfb086 Chen-Yu Tsai 2016-08-25 273 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
8adfb086 Chen-Yu Tsai 2016-08-25 274 mux->bypass_index);
8adfb086 Chen-Yu Tsai 2016-08-25 275 } else if (event == POST_RATE_CHANGE) {
8adfb086 Chen-Yu Tsai 2016-08-25 276 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
8adfb086 Chen-Yu Tsai 2016-08-25 277 mux->original_index);
8adfb086 Chen-Yu Tsai 2016-08-25 278 }
8adfb086 Chen-Yu Tsai 2016-08-25 279
8adfb086 Chen-Yu Tsai 2016-08-25 280 udelay(mux->delay_us);
8adfb086 Chen-Yu Tsai 2016-08-25 281
8adfb086 Chen-Yu Tsai 2016-08-25 282 return notifier_from_errno(ret);
8adfb086 Chen-Yu Tsai 2016-08-25 283 }
8adfb086 Chen-Yu Tsai 2016-08-25 284
:::::: The code at line 271 was first introduced by commit
:::::: 8adfb08605a99d742853ff8cf4da5bc68db2028a clk: sunxi-ng: mux: Add clk notifier functions
:::::: TO: Chen-Yu Tsai [off-list ref]
:::::: CC: Maxime Ripard [off-list ref]
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel