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 <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
John Youn 2016-05-23 11:32:43 -07:00 committed by Felipe Balbi
parent 501058edeb
commit d07fa665c7
1 changed files with 1 additions and 1 deletions

View File

@ -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)