All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:4.19/android_r 15919/23449] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used
@ 2021-06-04 15:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-04 15:58 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/intel/linux-intel-lts.git 4.19/android_r
head:   d12f442b46a8bc16c4f3f7644a56fdf4133149c3
commit: 3179a1a38d96f565a2229b9244285c6abf62b10a [15919/23449] ANDROID: GKI: clk: Add support for voltage voting
config: x86_64-randconfig-a015-20210604 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5c0d1b2f902aa6a9cf47cc7e42c5b83bb2217cf9)
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
        # https://github.com/intel/linux-intel-lts/commit/3179a1a38d96f565a2229b9244285c6abf62b10a
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 4.19/android_r
        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: 33568 bytes --]

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

only message in thread, other threads:[~2021-06-04 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 15:58 [intel-linux-intel-lts:4.19/android_r 15919/23449] 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.