drivers/clk/keystone/sci-clk.c:391:8-14: ERROR: application of sizeof to pointer
kernel test robot
build botBCC: [email protected]
CC: [email protected]
TO: Johan Hovold <[email protected]>
CC: Stephen Boyd <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b2c27842ba853508b0da00187a7508eb3a96c8f7 commit: b276445e98fe28609688fb85b89a81b803910e63 [12472/13147] clk: keystone: fix compile testing
:::::: branch date: 17 hours ago
:::::: commit date: 3 days ago
config: powerpc-randconfig-r061-20251203 (https://download.01.org/0day-ci/archive/20251204/[email protected]/config)
compiler: powerpc-linux-gcc (GCC) 10.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]> | Reported-by: Julia Lawall <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
cocci warnings: (new ones prefixed by >>)
>> drivers/clk/keystone/sci-clk.c:391:8-14: ERROR: application of sizeof to pointer
vim +391 drivers/clk/keystone/sci-clk.c
f54d2cd3c1a231 Tero Kristo 2017-08-02 367
b745c0794e2ff2 Tero Kristo 2017-06-13 368 /**
b745c0794e2ff2 Tero Kristo 2017-06-13 369 * sci_clk_get - Xlate function for getting clock handles
b745c0794e2ff2 Tero Kristo 2017-06-13 370 * @clkspec: device tree clock specifier
b745c0794e2ff2 Tero Kristo 2017-06-13 371 * @data: pointer to the clock provider
b745c0794e2ff2 Tero Kristo 2017-06-13 372 *
b745c0794e2ff2 Tero Kristo 2017-06-13 373 * Xlate function for retrieving clock TI SCI hw clock handles based on
b745c0794e2ff2 Tero Kristo 2017-06-13 374 * device tree clock specifier. Called from the common clock framework,
b745c0794e2ff2 Tero Kristo 2017-06-13 375 * when a corresponding of_clk_get call is executed. Returns a pointer
b745c0794e2ff2 Tero Kristo 2017-06-13 376 * to the TI SCI hw clock struct, or ERR_PTR value in failure.
b745c0794e2ff2 Tero Kristo 2017-06-13 377 */
b745c0794e2ff2 Tero Kristo 2017-06-13 378 static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
b745c0794e2ff2 Tero Kristo 2017-06-13 379 {
b745c0794e2ff2 Tero Kristo 2017-06-13 380 struct sci_clk_provider *provider = data;
f54d2cd3c1a231 Tero Kristo 2017-08-02 381 struct sci_clk **clk;
f54d2cd3c1a231 Tero Kristo 2017-08-02 382 struct sci_clk key;
b745c0794e2ff2 Tero Kristo 2017-06-13 383
b745c0794e2ff2 Tero Kristo 2017-06-13 384 if (clkspec->args_count != 2)
b745c0794e2ff2 Tero Kristo 2017-06-13 385 return ERR_PTR(-EINVAL);
b745c0794e2ff2 Tero Kristo 2017-06-13 386
f54d2cd3c1a231 Tero Kristo 2017-08-02 387 key.dev_id = clkspec->args[0];
f54d2cd3c1a231 Tero Kristo 2017-08-02 388 key.clk_id = clkspec->args[1];
b745c0794e2ff2 Tero Kristo 2017-06-13 389
f54d2cd3c1a231 Tero Kristo 2017-08-02 390 clk = bsearch(&key, provider->clocks, provider->num_clocks,
f54d2cd3c1a231 Tero Kristo 2017-08-02 @391 sizeof(clk), _cmp_sci_clk);
b745c0794e2ff2 Tero Kristo 2017-06-13 392
f54d2cd3c1a231 Tero Kristo 2017-08-02 393 if (!clk)
b745c0794e2ff2 Tero Kristo 2017-06-13 394 return ERR_PTR(-ENODEV);
f54d2cd3c1a231 Tero Kristo 2017-08-02 395
f54d2cd3c1a231 Tero Kristo 2017-08-02 396 return &(*clk)->hw;
b745c0794e2ff2 Tero Kristo 2017-06-13 397 }
b745c0794e2ff2 Tero Kristo 2017-06-13 398 :::::: The code at line 391 was first introduced by commit
:::::: f54d2cd3c1a231e00732442fca329341d4f4250b clk: keystone: sci-clk: Fix sci_clk_get
:::::: TO: Tero Kristo <[email protected]>
:::::: CC: Stephen Boyd <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki