projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
501058e
)
usb: dwc3: gadget: Fix usage of bitwise operator
author
John Youn
<johnyoun@synopsys.com>
Mon, 23 May 2016 18:32:43 +0000
(11:32 -0700)
committer
Felipe Balbi
<felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:42 +0000
(12:32 +0300)
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>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index 6a18b3d0dccfcecc10cde5d679a7b1b37c2bbc5b..f38db3b79d3fe01a7e0b281e43dfaf2722437c48 100644
(file)
--- 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)