From: Jakob Hauser <jahau@rocketmail.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Lee Jones <lee@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Beomho Seo <beomho.seo@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Stephan Gerhold <stephan@gerhold.net>,
Raymond Hackley <raymondhackley@protonmail.com>,
Pavel Machek <pavel@ucw.cz>, Axel Lin <axel.lin@ingics.com>,
ChiYuan Huang <cy_huang@richtek.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v2 6/9] power: supply: rt5033_charger: Add RT5033 charger device driver
Date: Sun, 23 Apr 2023 11:55:52 +0200 [thread overview]
Message-ID: <07c93b21-1c96-4bd4-9af2-53b76da14fde@rocketmail.com> (raw)
In-Reply-To: <202304230924.lqgvPwZ0-lkp@intel.com>
Hi Sebastian,
On 23.04.23 03:22, kernel test robot wrote:
> 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, ®_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
>
Here as well I'll change "return state;" into "return
POWER_SUPPLY_STATUS_UNKNOWN;". If the driver fails to get the regmap,
the status is "unknown".
Kind regards,
Jakob
next prev parent reply other threads:[~2023-04-23 10:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1681646904.git.jahau.ref@rocketmail.com>
2023-04-16 12:44 ` [PATCH v2 0/9] " Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 1/9] mfd: rt5033: Drop rt5033-battery sub-device Jakob Hauser
2023-04-20 8:05 ` Linus Walleij
2023-04-16 12:44 ` [PATCH v2 2/9] mfd: rt5033: Fix chip revision readout Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 3/9] mfd: rt5033: Fix STAT_MASK, HZ_MASK and AICR defines Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 4/9] mfd: rt5033: Apply preparatory changes before adding rt5033-charger driver Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 5/9] regulator: rt5033: Change regulator names to lowercase Jakob Hauser
2023-04-16 18:32 ` Krzysztof Kozlowski
2023-04-18 21:24 ` Jakob Hauser
2023-04-19 8:40 ` Krzysztof Kozlowski
2023-04-19 22:21 ` Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 6/9] power: supply: rt5033_charger: Add RT5033 charger device driver Jakob Hauser
2023-04-23 1:22 ` kernel test robot
2023-04-23 9:55 ` Jakob Hauser [this message]
2023-04-16 12:44 ` [PATCH v2 7/9] power: supply: rt5033_charger: Add cable detection and USB OTG supply Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 8/9] power: supply: rt5033_battery: Adopt status property from charger Jakob Hauser
2023-04-23 9:46 ` Jakob Hauser
2023-04-16 12:44 ` [PATCH v2 9/9] dt-bindings: Add documentation for rt5033 mfd, regulator and charger Jakob Hauser
2023-04-16 18:39 ` Krzysztof Kozlowski
2023-04-18 21:37 ` Jakob Hauser
2023-04-19 8:42 ` Krzysztof Kozlowski
2023-04-19 22:41 ` Jakob Hauser
2023-04-20 7:59 ` Linus Walleij
2023-04-20 8:03 ` Linus Walleij
2023-04-20 21:16 ` Jakob Hauser
2023-04-21 9:20 ` Linus Walleij
2023-04-21 22:15 ` Jakob Hauser
2023-04-16 18:29 ` [PATCH v2 0/9] Add RT5033 charger device driver Krzysztof Kozlowski
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=07c93b21-1c96-4bd4-9af2-53b76da14fde@rocketmail.com \
--to=jahau@rocketmail.com \
--cc=axel.lin@ingics.com \
--cc=beomho.seo@samsung.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=cy_huang@richtek.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=phone-devel@vger.kernel.org \
--cc=raymondhackley@protonmail.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=stephan@gerhold.net \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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
all inboxes | Powered by JetHome®