From: kernel test robot <lkp@intel.com>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>, sboyd@kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
tsbogend@alpha.franken.de, gregkh@linuxfoundation.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
robh+dt@kernel.org, john@phrozen.org, neil@brown.name
Subject: Re: [PATCH v7 3/6] clk: ralink: add clock driver for mt7621 SoC
Date: Wed, 17 Feb 2021 21:38:28 +0800 [thread overview]
Message-ID: <202102172137.FNKVcUXU-lkp@intel.com> (raw)
In-Reply-To: <20210217114000.19571-4-sergio.paracuellos@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8301 bytes --]
Hi Sergio,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on clk/clk-next robh/for-next linus/master v5.11 next-20210216]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sergio-Paracuellos/MIPS-ralink-add-CPU-clock-detection-and-clock-driver-for-MT7621/20210217-194316
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 4eb839aef182fccf8995ee439fc2b48d43e45918
config: riscv-randconfig-r036-20210217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/9b83f7b7032e26686ddc5d89e82ee2df4dc260d3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergio-Paracuellos/MIPS-ralink-add-CPU-clock-detection-and-clock-driver-for-MT7621/20210217-194316
git checkout 9b83f7b7032e26686ddc5d89e82ee2df4dc260d3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/clk/ralink/clk-mt7621.c:459:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!clk_data)
^~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:459:2: note: remove the 'if' if its condition is always false
if (!clk_data)
^~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:451:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (IS_ERR(priv->memc)) {
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:451:2: note: remove the 'if' if its condition is always false
if (IS_ERR(priv->memc)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:445:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (IS_ERR(priv->sysc)) {
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:445:2: note: remove the 'if' if its condition is always false
if (IS_ERR(priv->sysc)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:438:9: note: initialize the variable 'ret' to silence this warning
int ret, i, count;
^
= 0
3 warnings generated.
vim +459 drivers/clk/ralink/clk-mt7621.c
431
432 static int mt7621_clk_probe(struct platform_device *pdev)
433 {
434 struct device_node *np = pdev->dev.of_node;
435 struct clk_hw_onecell_data *clk_data;
436 struct device *dev = &pdev->dev;
437 struct mt7621_clk_priv *priv;
438 int ret, i, count;
439
440 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
441 if (!priv)
442 return -ENOMEM;
443
444 priv->sysc = syscon_regmap_lookup_by_phandle(np, "ralink,sysctl");
445 if (IS_ERR(priv->sysc)) {
446 dev_err(dev, "Could not get sysc syscon regmap\n");
447 goto free_clk_priv;
448 }
449
450 priv->memc = syscon_regmap_lookup_by_phandle(np, "ralink,memctl");
451 if (IS_ERR(priv->memc)) {
452 dev_err(dev, "Could not get memc syscon regmap\n");
453 goto free_clk_priv;
454 }
455
456 count = ARRAY_SIZE(mt7621_clks_base) +
457 ARRAY_SIZE(mt7621_fixed_clks) + ARRAY_SIZE(mt7621_gates);
458 clk_data = kzalloc(struct_size(clk_data, hws, count), GFP_KERNEL);
> 459 if (!clk_data)
460 goto free_clk_priv;
461
462 for (i = 0; i < ARRAY_SIZE(mt7621_clks_base); i++)
463 clk_data->hws[i] = mt7621_clk_early[i];
464
465 ret = mt7621_register_fixed_clocks(dev, clk_data);
466 if (ret) {
467 dev_err(dev, "Couldn't register fixed clocks\n");
468 goto free_clk_data;
469 }
470
471 ret = mt7621_register_gates(dev, clk_data, priv);
472 if (ret) {
473 dev_err(dev, "Couldn't register fixed clock gates\n");
474 goto unreg_clk_fixed;
475 }
476
477 clk_data->num = count;
478
479 ret = mt7621_prepare_enable_clocks(clk_data);
480 if (ret) {
481 dev_err(dev, "Couldn't register fixed clock gates\n");
482 goto unreg_clk_gates;
483 }
484
485 ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_data);
486 if (ret) {
487 dev_err(dev, "Couldn't add clk hw provider\n");
488 goto disable_clks;
489 }
490
491 return 0;
492
493 disable_clks:
494 for (i = 0; i < MT7621_CLK_MAX; i++)
495 clk_disable_unprepare(clk_data->hws[i]->clk);
496
497 unreg_clk_gates:
498 for (i = 0; i < ARRAY_SIZE(mt7621_gates); i++) {
499 struct mt7621_gate *sclk = &mt7621_gates[i];
500
501 clk_hw_unregister(&sclk->hw);
502 }
503
504 unreg_clk_fixed:
505 for (i = 0; i < ARRAY_SIZE(mt7621_fixed_clks); i++) {
506 struct mt7621_fixed_clk *sclk = &mt7621_fixed_clks[i];
507
508 clk_hw_unregister_fixed_rate(sclk->hw);
509 }
510
511 free_clk_data:
512 kfree(clk_data);
513
514 free_clk_priv:
515 kfree(priv);
516
517 return ret;
518 }
519
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35739 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v7 3/6] clk: ralink: add clock driver for mt7621 SoC
Date: Wed, 17 Feb 2021 21:38:28 +0800 [thread overview]
Message-ID: <202102172137.FNKVcUXU-lkp@intel.com> (raw)
In-Reply-To: <20210217114000.19571-4-sergio.paracuellos@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8490 bytes --]
Hi Sergio,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on clk/clk-next robh/for-next linus/master v5.11 next-20210216]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sergio-Paracuellos/MIPS-ralink-add-CPU-clock-detection-and-clock-driver-for-MT7621/20210217-194316
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 4eb839aef182fccf8995ee439fc2b48d43e45918
config: riscv-randconfig-r036-20210217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/9b83f7b7032e26686ddc5d89e82ee2df4dc260d3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergio-Paracuellos/MIPS-ralink-add-CPU-clock-detection-and-clock-driver-for-MT7621/20210217-194316
git checkout 9b83f7b7032e26686ddc5d89e82ee2df4dc260d3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/clk/ralink/clk-mt7621.c:459:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!clk_data)
^~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:459:2: note: remove the 'if' if its condition is always false
if (!clk_data)
^~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:451:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (IS_ERR(priv->memc)) {
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:451:2: note: remove the 'if' if its condition is always false
if (IS_ERR(priv->memc)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:445:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (IS_ERR(priv->sysc)) {
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ralink/clk-mt7621.c:517:9: note: uninitialized use occurs here
return ret;
^~~
drivers/clk/ralink/clk-mt7621.c:445:2: note: remove the 'if' if its condition is always false
if (IS_ERR(priv->sysc)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/clk/ralink/clk-mt7621.c:438:9: note: initialize the variable 'ret' to silence this warning
int ret, i, count;
^
= 0
3 warnings generated.
vim +459 drivers/clk/ralink/clk-mt7621.c
431
432 static int mt7621_clk_probe(struct platform_device *pdev)
433 {
434 struct device_node *np = pdev->dev.of_node;
435 struct clk_hw_onecell_data *clk_data;
436 struct device *dev = &pdev->dev;
437 struct mt7621_clk_priv *priv;
438 int ret, i, count;
439
440 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
441 if (!priv)
442 return -ENOMEM;
443
444 priv->sysc = syscon_regmap_lookup_by_phandle(np, "ralink,sysctl");
445 if (IS_ERR(priv->sysc)) {
446 dev_err(dev, "Could not get sysc syscon regmap\n");
447 goto free_clk_priv;
448 }
449
450 priv->memc = syscon_regmap_lookup_by_phandle(np, "ralink,memctl");
451 if (IS_ERR(priv->memc)) {
452 dev_err(dev, "Could not get memc syscon regmap\n");
453 goto free_clk_priv;
454 }
455
456 count = ARRAY_SIZE(mt7621_clks_base) +
457 ARRAY_SIZE(mt7621_fixed_clks) + ARRAY_SIZE(mt7621_gates);
458 clk_data = kzalloc(struct_size(clk_data, hws, count), GFP_KERNEL);
> 459 if (!clk_data)
460 goto free_clk_priv;
461
462 for (i = 0; i < ARRAY_SIZE(mt7621_clks_base); i++)
463 clk_data->hws[i] = mt7621_clk_early[i];
464
465 ret = mt7621_register_fixed_clocks(dev, clk_data);
466 if (ret) {
467 dev_err(dev, "Couldn't register fixed clocks\n");
468 goto free_clk_data;
469 }
470
471 ret = mt7621_register_gates(dev, clk_data, priv);
472 if (ret) {
473 dev_err(dev, "Couldn't register fixed clock gates\n");
474 goto unreg_clk_fixed;
475 }
476
477 clk_data->num = count;
478
479 ret = mt7621_prepare_enable_clocks(clk_data);
480 if (ret) {
481 dev_err(dev, "Couldn't register fixed clock gates\n");
482 goto unreg_clk_gates;
483 }
484
485 ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_data);
486 if (ret) {
487 dev_err(dev, "Couldn't add clk hw provider\n");
488 goto disable_clks;
489 }
490
491 return 0;
492
493 disable_clks:
494 for (i = 0; i < MT7621_CLK_MAX; i++)
495 clk_disable_unprepare(clk_data->hws[i]->clk);
496
497 unreg_clk_gates:
498 for (i = 0; i < ARRAY_SIZE(mt7621_gates); i++) {
499 struct mt7621_gate *sclk = &mt7621_gates[i];
500
501 clk_hw_unregister(&sclk->hw);
502 }
503
504 unreg_clk_fixed:
505 for (i = 0; i < ARRAY_SIZE(mt7621_fixed_clks); i++) {
506 struct mt7621_fixed_clk *sclk = &mt7621_fixed_clks[i];
507
508 clk_hw_unregister_fixed_rate(sclk->hw);
509 }
510
511 free_clk_data:
512 kfree(clk_data);
513
514 free_clk_priv:
515 kfree(priv);
516
517 return ret;
518 }
519
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35739 bytes --]
next prev parent reply other threads:[~2021-02-17 13:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 11:39 [PATCH v7 0/6] MIPS: ralink: add CPU clock detection and clock driver for MT7621 Sergio Paracuellos
2021-02-17 11:39 ` [PATCH v7 1/6] dt-bindings: clock: add dt binding header for mt7621 clocks Sergio Paracuellos
2021-02-17 11:39 ` [PATCH v7 2/6] dt: bindings: add mt7621-clk device tree binding documentation Sergio Paracuellos
2021-02-17 11:39 ` [PATCH v7 3/6] clk: ralink: add clock driver for mt7621 SoC Sergio Paracuellos
2021-02-17 13:38 ` kernel test robot [this message]
2021-02-17 13:38 ` kernel test robot
2021-02-17 11:39 ` [PATCH v7 4/6] staging: mt7621-dts: make use of new 'mt7621-clk' Sergio Paracuellos
2021-02-17 11:39 ` [PATCH v7 5/6] staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' Sergio Paracuellos
2021-02-17 11:40 ` [PATCH v7 6/6] MAINTAINERS: add MT7621 CLOCK maintainer Sergio Paracuellos
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=202102172137.FNKVcUXU-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=john@phrozen.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=neil@brown.name \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sergio.paracuellos@gmail.com \
--cc=tsbogend@alpha.franken.de \
/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.