From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [tobetter-linux:odroid-5.9.y 45/71] drivers/regulator/s2mps11.c:1252 s2mps11_pmic_shutdown() warn: unsigned 'ret' is never less than zero.
Date: Thu, 08 Oct 2020 02:54:18 +0800 [thread overview]
Message-ID: <202010080217.Q7AxYYJd-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
tree: https://github.com/tobetter/linux odroid-5.9.y
head: 2189c37332c364084ef11d5aaeb2d79860f60715
commit: 2d7fa59f425970d0bb1bdc9fbc1a5d2532abbc33 [45/71] ODROID-XU4: regulator: s2mps11: call shutdown function to poweroff
config: i386-randconfig-m021-20201008 (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>
smatch warnings:
drivers/regulator/s2mps11.c:1252 s2mps11_pmic_shutdown() warn: unsigned 'ret' is never less than zero.
vim +/ret +1252 drivers/regulator/s2mps11.c
1245
1246 static void s2mps11_pmic_shutdown(struct platform_device *pdev)
1247 {
1248 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
1249 unsigned int reg_val, ret;
1250
1251 ret = regmap_read(iodev->regmap_pmic, S2MPS11_REG_CTRL1, ®_val);
> 1252 if (ret < 0) {
1253 dev_crit(&pdev->dev, "could not read S2MPS11_REG_CTRL1 value\n");
1254 } else {
1255 /*
1256 * s2mps11-pmic: S2MPS11_REG_CTRL1 reg value
1257 * is 00000000000000000000000000010000
1258 * clear the S2MPS11_REG_CTRL1 0x10 value to shutdown.
1259 */
1260 if (reg_val & BIT(4)) {
1261 ret = regmap_update_bits(iodev->regmap_pmic,
1262 S2MPS11_REG_CTRL1,
1263 BIT(4), BIT(0));
1264 if (ret)
1265 dev_crit(&pdev->dev,
1266 "could not write S2MPS11_REG_CTRL1 value\n");
1267 }
1268 }
1269 }
1270
---
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: 30158 bytes --]
reply other threads:[~2020-10-07 18:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202010080217.Q7AxYYJd-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@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.