llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 6/9] power: supply: rt5033_charger: Add RT5033 charger device driver
       [not found] <665d8906ea7b84e0a248315e8395a80007b8bafb.1681646904.git.jahau@rocketmail.com>
@ 2023-04-23  1:22 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-04-23  1:22 UTC (permalink / raw)
  To: Jakob Hauser, Sebastian Reichel, Lee Jones, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: llvm, oe-kbuild-all, Beomho Seo, Chanwoo Choi, Stephan Gerhold,
	Raymond Hackley, Pavel Machek, Axel Lin, ChiYuan Huang, linux-pm,
	devicetree, linux-kernel, phone-devel, ~postmarketos/upstreaming,
	Jakob Hauser

Hi Jakob,

kernel test robot noticed the following build warnings:

[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on next-20230421]
[cannot apply to sre-power-supply/for-next broonie-regulator/for-next linus/master lee-mfd/for-mfd-fixes v6.3-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jakob-Hauser/mfd-rt5033-Fix-chip-revision-readout/20230416-214502
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link:    https://lore.kernel.org/r/665d8906ea7b84e0a248315e8395a80007b8bafb.1681646904.git.jahau%40rocketmail.com
patch subject: [PATCH v2 6/9] power: supply: rt5033_charger: Add RT5033 charger device driver
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230423/202304230924.lqgvPwZ0-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/intel-lab-lkp/linux/commit/0fbd385f9a1acd55a8d943560428b9d783f8047f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jakob-Hauser/mfd-rt5033-Fix-chip-revision-readout/20230416-214502
        git checkout 0fbd385f9a1acd55a8d943560428b9d783f8047f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/xen/ drivers/power/supply/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304230924.lqgvPwZ0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/power/supply/rt5033_charger.c:26:10: warning: variable 'state' is uninitialized when used here [-Wuninitialized]
                   return state;
                          ^~~~~
   drivers/power/supply/rt5033_charger.c:23:11: note: initialize the variable 'state' to silence this warning
           int state;
                    ^
                     = 0
   1 warning generated.


vim +/state +26 drivers/power/supply/rt5033_charger.c

    18	
    19	static int rt5033_get_charger_state(struct rt5033_charger *charger)
    20	{
    21		struct regmap *regmap = charger->rt5033->regmap;
    22		unsigned int reg_data;
    23		int state;
    24	
    25		if (!regmap)
  > 26			return state;
    27	
    28		regmap_read(regmap, RT5033_REG_CHG_STAT, &reg_data);
    29	
    30		switch (reg_data & RT5033_CHG_STAT_MASK) {
    31		case RT5033_CHG_STAT_DISCHARGING:
    32			state = POWER_SUPPLY_STATUS_DISCHARGING;
    33			break;
    34		case RT5033_CHG_STAT_CHARGING:
    35			state = POWER_SUPPLY_STATUS_CHARGING;
    36			break;
    37		case RT5033_CHG_STAT_FULL:
    38			state = POWER_SUPPLY_STATUS_FULL;
    39			break;
    40		case RT5033_CHG_STAT_NOT_CHARGING:
    41			state = POWER_SUPPLY_STATUS_NOT_CHARGING;
    42			break;
    43		default:
    44			state = POWER_SUPPLY_STATUS_UNKNOWN;
    45		}
    46	
    47		return state;
    48	}
    49	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

only message in thread, other threads:[~2023-04-23  1:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <665d8906ea7b84e0a248315e8395a80007b8bafb.1681646904.git.jahau@rocketmail.com>
2023-04-23  1:22 ` [PATCH v2 6/9] power: supply: rt5033_charger: Add RT5033 charger device driver 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;
as well as URLs for NNTP newsgroup(s).