Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp273018pxb; Thu, 25 Feb 2021 02:01:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzE+S2r6kHSWSnAm4gEHXTcttuMVd28jGwzBhWN8GYm2YAdgYlRkVzC5FqBIRn7UtQLeFmF X-Received: by 2002:a17:907:2d91:: with SMTP id gt17mr1852364ejc.271.1614247305894; Thu, 25 Feb 2021 02:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614247305; cv=none; d=google.com; s=arc-20160816; b=XiKUS7ynL7XWSblI+KxxP8Dp+A3W7jdQDc7ETahyWQyZEsbBe6jlmN9oiTY2mOeyED 9YGieiJCM8Mo2hHoc8f5QpHgNWXhdroWRgSxe8iWHMjbOtlErtQiM6/iCRlFlL3NDy/y hj9ZUfM+MQX5yBzk37Q5ebfO8/em4KqrlcP1vreIdzGZztEZQVu41ZwNhECsGQglOvcW 3qv6DIh8UXqXkS0pPliQSsQPAG8365V4z474w3dnLHqW3akbfHONsrwtPBEjkwukzxrj c+m9fLwwqsb3eJsw1kpx4EAPjATQkeUZkgJra0f72qh5PplNMDgGRmn7vncs2JSqisvN fLig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=8SiDFhYpnX2igiYzSdQNNRis7X1J70MJA2MZBp9piA8=; b=RjZ3bja1zd8HaEmDgCXkSsgwSANoy7q/MvAfct9SwRPkgV6zlKV+qYE6joI3XtbE7x ADlnF6k3dc+1BT8yXoo82BxrEZCvB2wVAOqZq6FrhqCor5bo3kU1JqHqnkmrRZusk42U ZdfEOLCMOzj/ZBfdsTVzy/QPAmL/JUQFDUBzvyiJ8SNf8abcJ9lC8ZI+dWJRA6TGg6xH AKQ/dArkRBYnNb1/7jv1YwIW/scpREc4fZ0hKHZVzTF7qt8BC0O6A9jhWyZMuMpvAbG4 8LYEFqhBj2rBbHMypF6Iille34JWmR8zlZQwrpvfAoz/3mQhVMq5fYlCBCnz0vT2Y9Gy IOtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho15si3368180ejc.249.2021.02.25.02.01.23; Thu, 25 Feb 2021 02:01:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232310AbhBYJrM (ORCPT + 99 others); Thu, 25 Feb 2021 04:47:12 -0500 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:53870 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232227AbhBYJrH (ORCPT ); Thu, 25 Feb 2021 04:47:07 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UPXAOhV_1614246378; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UPXAOhV_1614246378) by smtp.aliyun-inc.com(127.0.0.1); Thu, 25 Feb 2021 17:46:23 +0800 From: Jiapeng Chong To: sre@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] power: supply: cpcap-charger: remove unnecessary conversion to bool Date: Thu, 25 Feb 2021 17:46:15 +0800 Message-Id: <1614246375-89403-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/power/supply/cpcap-charger.c:468:31-36: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/power/supply/cpcap-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index 641dcad..0437480 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -465,7 +465,7 @@ static bool cpcap_charger_vbus_valid(struct cpcap_charger_ddata *ddata) error = iio_read_channel_processed(channel, &value); if (error >= 0) - return value > 3900 ? true : false; + return value > 3900; dev_err(ddata->dev, "error reading VBUS: %i\n", error); -- 1.8.3.1