drivers/usb/usbip/vudc_rx.c:145: possible bad bitmask ?

2016-07-18 Thread David Binderman
Hello there, drivers/usb/usbip/vudc_rx.c:145:27: warning: result of ‘11 << 30’ requires 35 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=] Source code is urb_p->urb->pipe &= ~(11 << 30); Maybe better code urb_p->urb->pipe &= ~(11UL &

linux-4.2-rc1/drivers/usb/host/ohci-tmio.c:104: possible missing break ?

2015-07-08 Thread David Binderman
; Suggest add missing break. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: linux-4.2-rc1/drivers/usb/host/ohci-tmio.c:104: possible missing break ?

2015-07-08 Thread David Binderman
not stopping you having a go. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: [PATCH] USB: OHCI: fix bad #define in ohci-tmio.c

2015-07-08 Thread David Binderman
;    case 2:     pm |= CCR_PM_USBPW2;                  break;        case 1:     pm |= CCR_PM_USBPW1; break; Just an idea. Regards David Binderman -- To unsubscribe from

RE: [PATCH] USB: OHCI: fix bad #define in ohci-tmio.c

2015-07-08 Thread David Binderman
() around the rhs of the |=. Like     pm |= (CCR_PM_USBPW1 | CCR_PM_USBPW2 | CCR_PM_USBPW3); This is okay with only three cases, but it starts to get unwieldy. Agreed. If more cases are to be added in the future, it might be worth inventing some new macros. Regards David Binderman

linux-4.1/drivers/usb/serial/io_edgeport.c: 7 * redundant conditions ?

2015-06-22 Thread David Binderman
-is_epic) (edge_serial-epic_descriptor.Supports.IOSPClose))) { 3. [linux-4.1/drivers/usb/serial/io_edgeport.c:1615]: (style) Redundant condition: edge_serial.is_epic. 'A (!A || B)' is equivalent to 'A || B' More of the same at lines 1631, 2468, 2497, 2501 Regards David Binderman

RE: linux-4.1/drivers/usb/serial/io_edgeport.c: 7 * redundant conditions ?

2015-06-22 Thread David Binderman
for someone else to claim the victory of submitting a proper patch. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in

usb/phy/phy-msm-usb.c:1109: possible missing break ?

2015-01-22 Thread David Binderman
-chg_state = USB_CHG_STATE_DETECTED;     case USB_CHG_STATE_DETECTED: Suggest code rework. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo

gadget/net2272.c:2075: possible bad test ?

2014-07-10 Thread David Binderman
Hello there, [linux-3.16-rc4/drivers/usb/gadget/net2272.c:2075]: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses. if (!intcsr (1 NET2272_PCI_IRQ)) { Maybe the programmer intended if (!(intcsr (1 NET2272_PCI_IRQ))) { Regards David

host/ohci-tmio.c:104: possible novice coding error ?

2014-07-10 Thread David Binderman
: pm |= CCR_PM_USBPW3; case 2: pm |= CCR_PM_USBPW2; case 1: pm |= CCR_PM_USBPW1; } Suggest add missing breaks. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe

RE: [PATCH] usb: gadget: gr_udc: Fix check for invalid number of microframes

2014-06-26 Thread David Binderman
of band, I usually try to arrange that the error message shows the value and, if possible, the band limits. Suggest rework error message in call to dev_err. Maybe dev_err(dev-dev, Invalid value '0x3' for transactions per microframe\n); would be better. Regards David Binderman

usb/gadget/gr_udc.c:1528: possible bad test ?

2014-06-17 Thread David Binderman
. Suggest code rework. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: [PATCH] usb: musb_dsps: fix res_name length

2012-10-17 Thread David Binderman
code ok. Parameter id is if type u8, you might want to add a few more chars to res_name to accommodate possible future expansion up to 256. Just an idea, it doesn't have to happen. Regards David Binderman Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Daniel Mack zon

RE: musb/musb_dsps.c:533]: (error) Buffer is accessed out of bounds

2012-10-16 Thread David Binderman
you, if some enterprising person were to invent the patch, I wouldn't grumble ;- Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info

usb/host/ohci-tmio.c:105: bad switch statement

2012-08-06 Thread David Binderman
rework. Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html