* [PATCH] power: supply: max14656: remove set but not used 'ret'
@ 2020-04-09 8:54 Jason Yan
2020-04-13 21:05 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-09 8:54 UTC (permalink / raw)
To: sre, linux-pm, linux-kernel; +Cc: Jason Yan
Fix the following gcc warning:
drivers/power/supply/max14656_charger_detector.c:142:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret = 0;
^~~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/power/supply/max14656_charger_detector.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/power/supply/max14656_charger_detector.c b/drivers/power/supply/max14656_charger_detector.c
index 3bbb8b4c8ae7..137f9fafce8c 100644
--- a/drivers/power/supply/max14656_charger_detector.c
+++ b/drivers/power/supply/max14656_charger_detector.c
@@ -139,10 +139,9 @@ static void max14656_irq_worker(struct work_struct *work)
u8 buf[REG_TOTAL_NUM];
u8 chg_type;
- int ret = 0;
- ret = max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
- REG_TOTAL_NUM, buf);
+ max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
+ REG_TOTAL_NUM, buf);
if ((buf[MAX14656_STATUS_1] & STATUS1_VB_VALID_MASK) &&
(buf[MAX14656_STATUS_1] & STATUS1_CHG_TYPE_MASK)) {
--
2.17.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power: supply: max14656: remove set but not used 'ret'
2020-04-09 8:54 [PATCH] power: supply: max14656: remove set but not used 'ret' Jason Yan
@ 2020-04-13 21:05 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2020-04-13 21:05 UTC (permalink / raw)
To: Jason Yan; +Cc: linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
Hi,
On Thu, Apr 09, 2020 at 04:54:01PM +0800, Jason Yan wrote:
> Fix the following gcc warning:
>
> drivers/power/supply/max14656_charger_detector.c:142:6: warning:
> variable ‘ret’ set but not used [-Wunused-but-set-variable]
> int ret = 0;
> ^~~
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/max14656_charger_detector.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/power/supply/max14656_charger_detector.c b/drivers/power/supply/max14656_charger_detector.c
> index 3bbb8b4c8ae7..137f9fafce8c 100644
> --- a/drivers/power/supply/max14656_charger_detector.c
> +++ b/drivers/power/supply/max14656_charger_detector.c
> @@ -139,10 +139,9 @@ static void max14656_irq_worker(struct work_struct *work)
>
> u8 buf[REG_TOTAL_NUM];
> u8 chg_type;
> - int ret = 0;
>
> - ret = max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
> - REG_TOTAL_NUM, buf);
> + max14656_read_block_reg(chip->client, MAX14656_DEVICE_ID,
> + REG_TOTAL_NUM, buf);
>
> if ((buf[MAX14656_STATUS_1] & STATUS1_VB_VALID_MASK) &&
> (buf[MAX14656_STATUS_1] & STATUS1_CHG_TYPE_MASK)) {
> --
> 2.17.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-13 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 8:54 [PATCH] power: supply: max14656: remove set but not used 'ret' Jason Yan
2020-04-13 21:05 ` Sebastian Reichel
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).