From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH v2 2/6] power: supply: add sw-gauge for SOC estimation and CC correction
Date: Mon, 07 Dec 2020 13:26:06 +0300 [thread overview]
Message-ID: <20201207102606.GV2767@kadam> (raw)
In-Reply-To: <639bd97975a7420f6357bdc6161e1fc427fca79d.1607085199.git.matti.vaittinen@fi.rohmeurope.com>
[-- Attachment #1: Type: text/plain, Size: 2167 bytes --]
Hi Matti,
url: https://github.com/0day-ci/linux/commits/Matti-Vaittinen/power-supply-Add-some-fuel-gauge-logic/20201204-205731
base: 09162bc32c880a791c6c0668ce0745cf7958f576
config: i386-randconfig-m021-20201205 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/power/supply/power_supply_swgauge.c:108 swgauge_set_cycle() error: uninitialized symbol 'ret'.
drivers/power/supply/power_supply_swgauge.c:960 psy_register_sw_gauge() warn: inconsistent indenting
drivers/power/supply/power_supply_swgauge.c:984 psy_remove_sw_gauge() warn: variable dereferenced before check 'sw' (see line 978)
vim +/ret +108 drivers/power/supply/power_supply_swgauge.c
d7d68650b1fb6d Matti Vaittinen 2020-12-04 98 static int swgauge_set_cycle(struct sw_gauge *sw, int new_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 99 {
d7d68650b1fb6d Matti Vaittinen 2020-12-04 100 int ret, old_cycle = sw->cycle;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 101
d7d68650b1fb6d Matti Vaittinen 2020-12-04 102 if (!sw->desc->allow_set_cycle && !sw->ops.set_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 103 return -EINVAL;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 104
d7d68650b1fb6d Matti Vaittinen 2020-12-04 105 if (sw->ops.set_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 106 ret = sw->ops.set_cycle(sw, old_cycle, &new_cycle);
^^^^^^^^^^^^^^^^^^^^^^^^
"ret" not initialized on else path.
d7d68650b1fb6d Matti Vaittinen 2020-12-04 107
d7d68650b1fb6d Matti Vaittinen 2020-12-04 @108 if (!ret)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 109 sw->cycle = new_cycle;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 110
d7d68650b1fb6d Matti Vaittinen 2020-12-04 111 return ret;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 112 }
---
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: 31251 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v2 2/6] power: supply: add sw-gauge for SOC estimation and CC correction
Date: Mon, 07 Dec 2020 13:26:06 +0300 [thread overview]
Message-ID: <20201207102606.GV2767@kadam> (raw)
In-Reply-To: <639bd97975a7420f6357bdc6161e1fc427fca79d.1607085199.git.matti.vaittinen@fi.rohmeurope.com>
[-- Attachment #1: Type: text/plain, Size: 2167 bytes --]
Hi Matti,
url: https://github.com/0day-ci/linux/commits/Matti-Vaittinen/power-supply-Add-some-fuel-gauge-logic/20201204-205731
base: 09162bc32c880a791c6c0668ce0745cf7958f576
config: i386-randconfig-m021-20201205 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/power/supply/power_supply_swgauge.c:108 swgauge_set_cycle() error: uninitialized symbol 'ret'.
drivers/power/supply/power_supply_swgauge.c:960 psy_register_sw_gauge() warn: inconsistent indenting
drivers/power/supply/power_supply_swgauge.c:984 psy_remove_sw_gauge() warn: variable dereferenced before check 'sw' (see line 978)
vim +/ret +108 drivers/power/supply/power_supply_swgauge.c
d7d68650b1fb6d Matti Vaittinen 2020-12-04 98 static int swgauge_set_cycle(struct sw_gauge *sw, int new_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 99 {
d7d68650b1fb6d Matti Vaittinen 2020-12-04 100 int ret, old_cycle = sw->cycle;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 101
d7d68650b1fb6d Matti Vaittinen 2020-12-04 102 if (!sw->desc->allow_set_cycle && !sw->ops.set_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 103 return -EINVAL;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 104
d7d68650b1fb6d Matti Vaittinen 2020-12-04 105 if (sw->ops.set_cycle)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 106 ret = sw->ops.set_cycle(sw, old_cycle, &new_cycle);
^^^^^^^^^^^^^^^^^^^^^^^^
"ret" not initialized on else path.
d7d68650b1fb6d Matti Vaittinen 2020-12-04 107
d7d68650b1fb6d Matti Vaittinen 2020-12-04 @108 if (!ret)
d7d68650b1fb6d Matti Vaittinen 2020-12-04 109 sw->cycle = new_cycle;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 110
d7d68650b1fb6d Matti Vaittinen 2020-12-04 111 return ret;
d7d68650b1fb6d Matti Vaittinen 2020-12-04 112 }
---
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: 31251 bytes --]
next prev parent reply other threads:[~2020-12-07 10:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 12:39 [RFC PATCH v2 0/6] power: supply: Add some fuel-gauge logic Matti Vaittinen
2020-12-04 12:41 ` [RFC PATCH v2 1/6] power: supply: add cap2ocv batinfo helper Matti Vaittinen
2020-12-08 8:54 ` Linus Walleij
2020-12-08 9:30 ` Vaittinen, Matti
2020-12-04 12:43 ` [RFC PATCH v2 2/6] power: supply: add sw-gauge for SOC estimation and CC correction Matti Vaittinen
2020-12-04 17:11 ` kernel test robot
2020-12-07 10:26 ` Dan Carpenter [this message]
2020-12-07 10:26 ` Dan Carpenter
2020-12-11 1:05 ` kernel test robot
2020-12-04 12:47 ` [RFC PATCH v2 3/6] mfd: prepare to support BD718xx-charger Matti Vaittinen
2020-12-16 8:49 ` Lee Jones
2020-12-04 12:49 ` [RFC PATCH v2 4/6] mfd: add BD71827 header Matti Vaittinen
2020-12-16 8:53 ` Lee Jones
2020-12-17 9:40 ` Vaittinen, Matti
2020-12-04 12:53 ` [RFC PATCH v2 5/6] power: supply: Add bd718(27/28/78) charger driver Matti Vaittinen
2020-12-04 18:02 ` kernel test robot
2020-12-11 2:47 ` kernel test robot
2020-12-04 12:54 ` [RFC PATCH v2 6/6] MFD: bd71828: differentiate bd71828 and bd71827 chargers Matti Vaittinen
2020-12-16 8:55 ` Lee Jones
-- strict thread matches above, loose matches on Subject: below --
2020-12-05 23:58 [RFC PATCH v2 2/6] power: supply: add sw-gauge for SOC estimation and CC correction 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=20201207102606.GV2767@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@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.