* [PATCH] phy: cpcap-usb: Simplify bool conversion
@ 2021-01-29 7:38 Yang Li
2021-02-06 10:09 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-01-29 7:38 UTC (permalink / raw)
To: kishon; +Cc: vkoul, linux-kernel, Yang Li
Fix the following coccicheck warning:
./drivers/phy/motorola/phy-cpcap-usb.c:146:31-36: WARNING: conversion to
bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/phy/motorola/phy-cpcap-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
index 4728e2b..6ee478b 100644
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -143,7 +143,7 @@ static bool cpcap_usb_vbus_valid(struct cpcap_phy_ddata *ddata)
error = iio_read_channel_processed(ddata->vbus, &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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: cpcap-usb: Simplify bool conversion
2021-01-29 7:38 [PATCH] phy: cpcap-usb: Simplify bool conversion Yang Li
@ 2021-02-06 10:09 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-02-06 10:09 UTC (permalink / raw)
To: Yang Li; +Cc: kishon, linux-kernel
On 29-01-21, 15:38, Yang Li wrote:
> Fix the following coccicheck warning:
> ./drivers/phy/motorola/phy-cpcap-usb.c:146:31-36: WARNING: conversion to
> bool not needed here
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-06 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 7:38 [PATCH] phy: cpcap-usb: Simplify bool conversion Yang Li
2021-02-06 10:09 ` Vinod Koul
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).