[PATCH] usb: misc: fix boolconv.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <fengguang.wu@xxxxxxxxx>

drivers/usb/misc/ft232h-intf.c:816:27-32: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Fixes: 0772a5bf580c ("usb: misc: add driver for FT232H based FPGA configuration devices")
CC: Anatolij Gustschin <agust@xxxxxxx>
Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Signd-off-by: Julia Lawall <julia.lawall@xxxxxxx>

---

url:    https://github.com/0day-ci/linux/commits/Anatolij-Gustschin/Add-support-for-ARRI-FPGA-configuration/20181120-161201
:::::: branch date: 17 hours ago
:::::: commit date: 17 hours ago

Please take the patch only if it's a positive warning. Thanks!

 ft232h-intf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/misc/ft232h-intf.c
+++ b/drivers/usb/misc/ft232h-intf.c
@@ -813,7 +813,7 @@ static int ftdi_mpsse_gpio_get(struct gp

 	dev_dbg(chip->parent, "%s: offset %d\n", __func__, offset);

-	low = offset < 5 ? true : false;
+	low = offset < 5;

 	mutex_lock(&priv->ops_mutex);




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux