[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009121532.GN1042@kadam>
Date: Fri, 9 Oct 2020 15:15:32 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Dan Murphy <dmurphy@...com>, sre@...nel.org
Cc: lkp@...el.com, kbuild-all@...ts.01.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
robh@...nel.org, Dan Murphy <dmurphy@...com>,
Ricardo Rivera-Matos <r-rivera-matos@...com>
Subject: Re: [PATCH v3 2/2] power: supply: bq25790: Introduce the BQ25790
charger driver
Hi Dan,
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/dt-bindings-power-Add-the-bq25790-dt-bindings/20201008-234450
base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
config: i386-randconfig-m021-20201009 (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@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
smatch warnings:
drivers/power/supply/bq25790_charger.c:170 bq25790_usb_work() warn: ignoring unreachable code.
drivers/power/supply/bq25790_charger.c:624 bq25790_get_property() warn: should this be a bitwise op?
vim +170 drivers/power/supply/bq25790_charger.c
bc435a97ea513a3 Dan Murphy 2020-10-08 154 static void bq25790_usb_work(struct work_struct *data)
bc435a97ea513a3 Dan Murphy 2020-10-08 155 {
bc435a97ea513a3 Dan Murphy 2020-10-08 156 struct bq25790_device *bq =
bc435a97ea513a3 Dan Murphy 2020-10-08 157 container_of(data, struct bq25790_device, usb_work);
bc435a97ea513a3 Dan Murphy 2020-10-08 158
bc435a97ea513a3 Dan Murphy 2020-10-08 159 switch (bq->usb_event) {
bc435a97ea513a3 Dan Murphy 2020-10-08 160 case USB_EVENT_ID:
bc435a97ea513a3 Dan Murphy 2020-10-08 161 break;
bc435a97ea513a3 Dan Murphy 2020-10-08 162
bc435a97ea513a3 Dan Murphy 2020-10-08 163 case USB_EVENT_NONE:
bc435a97ea513a3 Dan Murphy 2020-10-08 164 power_supply_changed(bq->charger);
bc435a97ea513a3 Dan Murphy 2020-10-08 165 break;
bc435a97ea513a3 Dan Murphy 2020-10-08 166 }
bc435a97ea513a3 Dan Murphy 2020-10-08 167
bc435a97ea513a3 Dan Murphy 2020-10-08 168 return;
^^^^^^
bc435a97ea513a3 Dan Murphy 2020-10-08 169
bc435a97ea513a3 Dan Murphy 2020-10-08 @170 dev_err(bq->dev, "Error switching to charger mode.\n");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unreachable.
bc435a97ea513a3 Dan Murphy 2020-10-08 171 }
The bitwise warning is this:
if (state.fault_1 && (BQ25790_OTG_OVP | BQ25790_VSYS_OVP))
^^
This && should be &.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35137 bytes)
Powered by blists - more mailing lists