Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d07fa665 authored by John Youn's avatar John Youn Committed by Felipe Balbi
Browse files

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: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 501058ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)