From d07fa665c79d85fead080f4b611c3f7645576454 Mon Sep 17 00:00:00 2001 From: John Youn Date: Mon, 23 May 2016 11:32:43 -0700 Subject: [PATCH] usb: dwc3: gadget: Fix usage of bitwise operator Cleans up the sparse warning: warning: dubious: x | !y Since we do want a bitwise OR here, don't use a logical (true/false) value. Probably is not a real issue but it cleans up the warning. Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 6a18b3d0dccf..f38db3b79d3f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1798,7 +1798,7 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc, u8 i; for (i = 0; i < num; i++) { - u8 epnum = (i << 1) | (!!direction); + u8 epnum = (i << 1) | (direction ? 1 : 0); dep = kzalloc(sizeof(*dep), GFP_KERNEL); if (!dep) -- 2.20.1