usb: core: endpoint: remove unnecessary & operation
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 28 Sep 2016 11:17:38 +0000 (14:17 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 3 Nov 2016 08:38:24 +0000 (10:38 +0200)
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/core/endpoint.c

index 101983b7e8d271f7aaedf1b594b4579dfefb489d..d8f37fbee84800e0e2fb017139b94c740e5c7476 100644 (file)
@@ -50,8 +50,7 @@ static ssize_t wMaxPacketSize_show(struct device *dev,
                                   struct device_attribute *attr, char *buf)
 {
        struct ep_device *ep = to_ep_device(dev);
-       return sprintf(buf, "%04x\n",
-                       usb_endpoint_maxp(ep->desc) & 0x07ff);
+       return sprintf(buf, "%04x\n", usb_endpoint_maxp(ep->desc));
 }
 static DEVICE_ATTR_RO(wMaxPacketSize);