diff options
author | John Youn <johnyoun@synopsys.com> | 2016-05-23 21:32:43 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-20 12:32:42 +0300 |
commit | d07fa665c79d85fead080f4b611c3f7645576454 (patch) | |
tree | 5bf917a4b8c5e8a05f06f3f8e3f0efec34a901cb /drivers | |
parent | 501058edebf957a3c101c8119c3286e496873840 (diff) | |
download | linux-d07fa665c79d85fead080f4b611c3f7645576454.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |