* [android-common:android-4.19-stable 14825/23012] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used
@ 2021-07-27 4:47 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-27 4:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4707 bytes --]
Hi Saravana,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: e6f64a043b8f2947387b0b24daabfe716d4b1ee3
commit: 3179a1a38d96f565a2229b9244285c6abf62b10a [14825/23012] ANDROID: GKI: clk: Add support for voltage voting
config: x86_64-randconfig-a011-20210726 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c658b472f3e61e1818e1909bf02f3d65470018a5)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19-stable
git checkout 3179a1a38d96f565a2229b9244285c6abf62b10a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/clk.c:624:24: warning: variable 'ignore' set but not used [-Wunused-but-set-variable]
int level, rc = 0, i, ignore;
^
>> drivers/clk/clk.c:3145:5: warning: no previous prototype for function 'clk_set_flags' [-Wmissing-prototypes]
int clk_set_flags(struct clk *clk, unsigned long flags)
^
drivers/clk/clk.c:3145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int clk_set_flags(struct clk *clk, unsigned long flags)
^
static
>> drivers/clk/clk.c:3157:6: warning: no previous prototype for function 'clk_debug_print_hw' [-Wmissing-prototypes]
void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f)
^
drivers/clk/clk.c:3157:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f)
^
static
3 warnings generated.
drivers/clk/clk.c:4257: warning: Function parameter or member 'dev' not described in 'devm_clk_unregister'
drivers/clk/clk.c:4455: warning: Function parameter or member 'get_hw' not described in 'of_clk_provider'
vim +/ignore +624 drivers/clk/clk.c
618
619 /*
620 * Update voltage level given the current votes.
621 */
622 static int clk_update_vdd(struct clk_vdd_class *vdd_class)
623 {
> 624 int level, rc = 0, i, ignore;
625 struct regulator **r = vdd_class->regulator;
626 int *uv = vdd_class->vdd_uv;
627 int n_reg = vdd_class->num_regulators;
628 int cur_lvl = vdd_class->cur_level;
629 int max_lvl = vdd_class->num_levels - 1;
630 int cur_base = cur_lvl * n_reg;
631 int new_base;
632
633 /* aggregate votes */
634 for (level = max_lvl; level > 0; level--)
635 if (vdd_class->level_votes[level])
636 break;
637
638 if (level == cur_lvl)
639 return 0;
640
641 max_lvl = max_lvl * n_reg;
642 new_base = level * n_reg;
643
644 for (i = 0; i < vdd_class->num_regulators; i++) {
645 pr_debug("Set Voltage level Min %d, Max %d\n", uv[new_base + i],
646 uv[max_lvl + i]);
647 rc = regulator_set_voltage(r[i], uv[new_base + i], INT_MAX);
648 if (rc)
649 goto set_voltage_fail;
650
651 if (cur_lvl == 0 || cur_lvl == vdd_class->num_levels)
652 rc = regulator_enable(r[i]);
653 else if (level == 0)
654 rc = regulator_disable(r[i]);
655 if (rc)
656 goto enable_disable_fail;
657 }
658
659 if (vdd_class->set_vdd && !vdd_class->num_regulators)
660 rc = vdd_class->set_vdd(vdd_class, level);
661
662 if (!rc)
663 vdd_class->cur_level = level;
664
665 return rc;
666
667 enable_disable_fail:
668 regulator_set_voltage(r[i], uv[cur_base + i], INT_MAX);
669
670 set_voltage_fail:
671 for (i--; i >= 0; i--) {
672 regulator_set_voltage(r[i], uv[cur_base + i], INT_MAX);
673 if (cur_lvl == 0 || cur_lvl == vdd_class->num_levels)
674 regulator_disable(r[i]);
675 else if (level == 0)
676 ignore = regulator_enable(r[i]);
677 }
678
679 return rc;
680 }
681
---
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: 33521 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [android-common:android-4.19-stable 14825/23012] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used
@ 2021-07-27 7:47 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-27 7:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4017 bytes --]
Hi Saravana,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: e6f64a043b8f2947387b0b24daabfe716d4b1ee3
commit: 3179a1a38d96f565a2229b9244285c6abf62b10a [14825/23012] ANDROID: GKI: clk: Add support for voltage voting
config: i386-allyesconfig (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19-stable
git checkout 3179a1a38d96f565a2229b9244285c6abf62b10a
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/clk.c: In function 'clk_update_vdd':
>> drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used [-Wunused-but-set-variable]
624 | int level, rc = 0, i, ignore;
| ^~~~~~
drivers/clk/clk.c: At top level:
>> drivers/clk/clk.c:3145:5: warning: no previous prototype for 'clk_set_flags' [-Wmissing-prototypes]
3145 | int clk_set_flags(struct clk *clk, unsigned long flags)
| ^~~~~~~~~~~~~
>> drivers/clk/clk.c:3157:6: warning: no previous prototype for 'clk_debug_print_hw' [-Wmissing-prototypes]
3157 | void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f)
| ^~~~~~~~~~~~~~~~~~
drivers/clk/clk.c:4257: warning: Function parameter or member 'dev' not described in 'devm_clk_unregister'
drivers/clk/clk.c:4455: warning: Function parameter or member 'get_hw' not described in 'of_clk_provider'
vim +/ignore +624 drivers/clk/clk.c
618
619 /*
620 * Update voltage level given the current votes.
621 */
622 static int clk_update_vdd(struct clk_vdd_class *vdd_class)
623 {
> 624 int level, rc = 0, i, ignore;
625 struct regulator **r = vdd_class->regulator;
626 int *uv = vdd_class->vdd_uv;
627 int n_reg = vdd_class->num_regulators;
628 int cur_lvl = vdd_class->cur_level;
629 int max_lvl = vdd_class->num_levels - 1;
630 int cur_base = cur_lvl * n_reg;
631 int new_base;
632
633 /* aggregate votes */
634 for (level = max_lvl; level > 0; level--)
635 if (vdd_class->level_votes[level])
636 break;
637
638 if (level == cur_lvl)
639 return 0;
640
641 max_lvl = max_lvl * n_reg;
642 new_base = level * n_reg;
643
644 for (i = 0; i < vdd_class->num_regulators; i++) {
645 pr_debug("Set Voltage level Min %d, Max %d\n", uv[new_base + i],
646 uv[max_lvl + i]);
647 rc = regulator_set_voltage(r[i], uv[new_base + i], INT_MAX);
648 if (rc)
649 goto set_voltage_fail;
650
651 if (cur_lvl == 0 || cur_lvl == vdd_class->num_levels)
652 rc = regulator_enable(r[i]);
653 else if (level == 0)
654 rc = regulator_disable(r[i]);
655 if (rc)
656 goto enable_disable_fail;
657 }
658
659 if (vdd_class->set_vdd && !vdd_class->num_regulators)
660 rc = vdd_class->set_vdd(vdd_class, level);
661
662 if (!rc)
663 vdd_class->cur_level = level;
664
665 return rc;
666
667 enable_disable_fail:
668 regulator_set_voltage(r[i], uv[cur_base + i], INT_MAX);
669
670 set_voltage_fail:
671 for (i--; i >= 0; i--) {
672 regulator_set_voltage(r[i], uv[cur_base + i], INT_MAX);
673 if (cur_lvl == 0 || cur_lvl == vdd_class->num_levels)
674 regulator_disable(r[i]);
675 else if (level == 0)
676 ignore = regulator_enable(r[i]);
677 }
678
679 return rc;
680 }
681
---
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: 56816 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-27 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 4:47 [android-common:android-4.19-stable 14825/23012] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used kernel test robot
2021-07-27 7:47 kernel test robot
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.