public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/power/supply/z2_battery.c:93:26: warning: variable 'info' set but not used
@ 2021-03-04 12:53 kernel test robot
  2021-03-09 16:26 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-04 12:53 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, Sebastian Reichel, Daniel Mack

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

Hi Linus,

FYI, the error/warning still remains.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* drivers/power/supply/z2_battery.c:93:26: warning: variable 'info' set but not used
@ 2021-03-03 20:56 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-03 20:56 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kbuild-all, linux-kernel, Sebastian Reichel, Daniel Mack

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-09 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2021-03-03 20:56 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox