OSDN Git Service

usb: gadget: udc: remove duplicate & operation
authorJaejoong Kim <climbbb.kim@gmail.com>
Fri, 20 Oct 2017 07:29:13 +0000 (16:29 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 20 Oct 2017 08:19:24 +0000 (11:19 +0300)
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0]
by & operation with 0x7ff. So, we can remove the duplicate & operation
with 0x7ff.

Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/core.c

index d41d07a..54b02ec 100644 (file)
@@ -912,7 +912,7 @@ int usb_gadget_ep_match_desc(struct usb_gadget *gadget,
                return 0;
 
        type = usb_endpoint_type(desc);
-       max = 0x7ff & usb_endpoint_maxp(desc);
+       max = usb_endpoint_maxp(desc);
 
        if (usb_endpoint_dir_in(desc) && !ep->caps.dir_in)
                return 0;