All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-4.19-stable 14825/17992] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used
@ 2020-09-03  2:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-03  2:13 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4192 bytes --]

tree:   https://android.googlesource.com/kernel/common android-4.19-stable
head:   9de56a001b2e707a208ab1fd4aaa92dabce9870d
commit: 3179a1a38d96f565a2229b9244285c6abf62b10a [14825/17992] ANDROID: GKI: clk: Add support for voltage voting
config: arm-randconfig-r025-20200903 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
        git checkout 3179a1a38d96f565a2229b9244285c6abf62b10a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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'

git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19-stable
git checkout 3179a1a38d96f565a2229b9244285c6abf62b10a
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: 28802 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-03  2:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03  2:13 [android-common:android-4.19-stable 14825/17992] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used 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.