public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Sebastian Reichel <sre@kernel.org>,
	Daniel Mack <daniel@zonque.org>
Subject: drivers/power/supply/z2_battery.c:93:26: warning: variable 'info' set but not used
Date: Thu, 4 Mar 2021 04:56:32 +0800	[thread overview]
Message-ID: <202103040425.5MP3kvNs-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f69d02e37a85645aa90d18cacfff36dba370f797
commit: a3b4388ea19b055ec482114e227c58d0184edfa5 power: supply: z2_battery: Convert to GPIO descriptors
date:   7 weeks ago
config: arm-randconfig-r025-20210304 (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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a3b4388ea19b055ec482114e227c58d0184edfa5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a3b4388ea19b055ec482114e227c58d0184edfa5
        # 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/power/supply/z2_battery.c: In function 'z2_batt_update':
>> drivers/power/supply/z2_battery.c:93:26: warning: variable 'info' set but not used [-Wunused-but-set-variable]
      93 |  struct z2_battery_info *info;
         |                          ^~~~


vim +/info +93 drivers/power/supply/z2_battery.c

e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   89  
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   90  static void z2_batt_update(struct z2_charger *charger)
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   91  {
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   92  	int old_status = charger->bat_status;
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  @93  	struct z2_battery_info *info;
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   94  
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   95  	info = charger->info;
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   96  
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   97  	mutex_lock(&charger->work_lock);
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28   98  
a3b4388ea19b05 drivers/power/supply/z2_battery.c Linus Walleij       2021-01-10   99  	charger->bat_status = charger->charge_gpiod ?
a3b4388ea19b05 drivers/power/supply/z2_battery.c Linus Walleij       2021-01-10  100  		(gpiod_get_value(charger->charge_gpiod) ?
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  101  		POWER_SUPPLY_STATUS_CHARGING :
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  102  		POWER_SUPPLY_STATUS_DISCHARGING) :
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  103  		POWER_SUPPLY_STATUS_UNKNOWN;
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  104  
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  105  	if (old_status != charger->bat_status) {
297d716f6260cc drivers/power/z2_battery.c        Krzysztof Kozlowski 2015-03-12  106  		pr_debug("%s: %i -> %i\n", charger->batt_ps->desc->name,
297d716f6260cc drivers/power/z2_battery.c        Krzysztof Kozlowski 2015-03-12  107  				old_status,
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  108  				charger->bat_status);
297d716f6260cc drivers/power/z2_battery.c        Krzysztof Kozlowski 2015-03-12  109  		power_supply_changed(charger->batt_ps);
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  110  	}
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  111  
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  112  	mutex_unlock(&charger->work_lock);
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  113  }
e3e8d1c93f9e6b drivers/power/z2_battery.c        Marek Vasut         2010-02-28  114  

:::::: The code at line 93 was first introduced by commit
:::::: e3e8d1c93f9e6b766424b05f23f2416f22a0329d Driver for Zipit Z2 battery chip

:::::: TO: Marek Vasut <marek.vasut@gmail.com>
:::::: CC: Anton Vorontsov <cbouatmailru@gmail.com>

---
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: 46249 bytes --]

             reply	other threads:[~2021-03-04  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 20:56 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-04 12:53 drivers/power/supply/z2_battery.c:93:26: warning: variable 'info' set but not used kernel test robot
2021-03-09 16:26 ` Linus Walleij

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=202103040425.5MP3kvNs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel@zonque.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sre@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox