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:
parent
501058edeb
commit
d07fa665c7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue