All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [android-common:android-4.19-stable 14825/23012] drivers/clk/clk.c:624:24: warning: variable 'ignore' set but not used
Date: Tue, 27 Jul 2021 15:47:40 +0800	[thread overview]
Message-ID: <202107271535.vuldzd03-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-07-27  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  7:47 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=202107271535.vuldzd03-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.