2021-01-14 09:07:06

by Abaci Team

[permalink] [raw]
Subject: [PATCH] drivers/usb/gadget/udc: Assign boolean values to a bool variable

Fix the following coccicheck warnings:

./drivers/usb/gadget/udc/udc-xilinx.c:1957:2-18: WARNING:
Assignment of 0/1 to bool variable.

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Zhong <[email protected]>
---
drivers/usb/gadget/udc/udc-xilinx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index d5e9d20..77610b5 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -1954,7 +1954,7 @@ static void xudc_nonctrl_ep_handler(struct xusb_udc *udc, u8 epnum,
if (intrstatus & (XUSB_STATUS_EP0_BUFF1_COMP_MASK << epnum))
ep->buffer0ready = 0;
if (intrstatus & (XUSB_STATUS_EP0_BUFF2_COMP_MASK << epnum))
- ep->buffer1ready = 0;
+ ep->buffer1ready = false;

if (list_empty(&ep->queue))
return;
--
1.8.3.1


2021-01-14 09:25:45

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH] drivers/usb/gadget/udc: Assign boolean values to a bool variable

Jiapeng Zhong <[email protected]> writes:

> Fix the following coccicheck warnings:
>
> ./drivers/usb/gadget/udc/udc-xilinx.c:1957:2-18: WARNING:
> Assignment of 0/1 to bool variable.
>
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Zhong <[email protected]>

Acked-by: Felipe Balbi <[email protected]>

--
balbi


Attachments:
signature.asc (873.00 B)