Re: [PATCH] usb: dwc2: host: fix Wmaybe-uninitialized warning

2017-01-12 Thread Nicholas Mc Guire
On Thu, Jan 12, 2017 at 05:25:00PM +0100, Greg Kroah-Hartman wrote: > On Thu, Jan 12, 2017 at 04:54:38PM +0100, Nicholas Mc Guire wrote: > > Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> > > --- > > Problem reported by sparse > > drivers/usb/dwc2/hcd.c

[PATCH V2] usb: dwc2: host: fix Wmaybe-uninitialized warning

2017-01-12 Thread Nicholas Mc Guire
Uninitialized char* causes a sparse build-warning, fix it up by initializing it to NULL. Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- V2: add missing change-log as requested by Greg Kroah-Hartman <gre...@linuxfoundation.org> Problem reported by sparse drivers/us

[PATCH] usb: dwc2: host: use msleep() for long delays

2017-01-12 Thread Nicholas Mc Guire
ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 20+ ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- P

[PATCH] usb: dwc2: host: use true/false for boolean

2017-01-12 Thread Nicholas Mc Guire
For boolean variables true/false is preferred over 1/0 for readability. Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- Problem reported by scripts/coccinelle/misc/boolinit.cocci: ./drivers/usb/dwc2/hcd.c:5003:2-24: WARNING: Assignment of bool to 0/1 ./drivers/usb/dwc2/hcd.c:339

[PATCH] usb: dwc2: host: fix Wmaybe-uninitialized warning

2017-01-12 Thread Nicholas Mc Guire
Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- Problem reported by sparse drivers/usb/dwc2/hcd.c: In function 'dwc2_dump_urb_info': ./include/linux/dynamic_debug.h:134:3: warning: 'pipetype' may be used uninitialized in this function [-Wmaybe-uninitialized] __dynamic_dev_dbg

[PATCH RFC] usb: dwc2: host: use msleep() for long delay

2017-01-12 Thread Nicholas Mc Guire
"usb: dwc2: Properly account for the force mode delays") Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- Problem was found by cocinelle script. Note that this originally was an msleep(25) then commit 2938fc63e0c2 ("usb: dwc2: Properly account for the force mode delays&

Re: [PATCH] usb: renesas_usbhs: simplify list handling

2016-11-07 Thread Nicholas Mc Guire
On Tue, Nov 08, 2016 at 12:26:45PM +0900, Masahiro Yamada wrote: > >> Fixes: 6acb95d4e070 ("usb: renesas_usbhs: modify packet queue control > >> method") > > > This is not a fix, but a clean-up patch. true - I´ve been using it incorrectly to basically just record the origin of the issue found

[PATCH] usb: dwc2: gadget: simplify list handling

2016-11-07 Thread Nicholas Mc Guire
The current code is effectively equivalent to list_first_entry_or_null() so simply switch and simplify the code. Fixes: 9c39ddc60ee9 ("USB: s3c-hsotg: Fix stall condition processing") Signed-off-by: Nicholas Mc Guire <hof...@osadl.org> --- Found by simple coccinelle scanner

[PATCH] xhci: match return type of wait_for_completion_timeout

2015-03-15 Thread Nicholas Mc Guire
Return type of wait_for_completion_timeout is unsigned long not int. As time_left is exclusively used for wait_for_completion_timeout here its type is simply changed to unsigned long. Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was only compile tested with x86_64_defconfig

[PATCH] USB: legotower: use msecs_to_jiffies for time conversion

2015-02-06 Thread Nicholas Mc Guire
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was only compile tested with x86_64_defconfig + CONFIG_USB_LEGOTOWER=m Patch is against 3.19.0-rc7

[PATCH] USB: image: use msecs_to_jiffies for time conversion

2015-02-06 Thread Nicholas Mc Guire
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Note that the indentation is not aligned with the correct ( here due to lines going over 80 char - not sure

[PATCH] usb: isp1760: use msecs_to_jiffies for time conversion

2015-02-06 Thread Nicholas Mc Guire
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was only compile tested with x86_64_defconfig + CONFIG_USB_ISP1760=m Patch is against 3.19.0-rc7 (localversion

Re: [PATCH] USB: image: use msecs_to_jiffies for time conversion

2015-02-06 Thread Nicholas Mc Guire
On Fri, 06 Feb 2015, Sergei Shtylyov wrote: Hello. On 2/6/2015 12:50 PM, Nicholas Mc Guire wrote: This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Note

[PATCH] mmc: vub300: remove unreachable return value handling

2015-01-17 Thread Nicholas Mc Guire
Signed-off-by: Nicholas Mc Guire der.h...@hofr.at --- The return value of wait_for_completion_timeout is unsigned long, as it is used here for wait_for_completion_timeout only the type of commretval was changed to unsigned long. As wait_for_completion_timeout does not return negative values

[PATCH] cleanup on stack DECLARE_COMPLETIONs

2014-12-23 Thread Nicholas Mc Guire
tested Signed-off-by: Nicholas Mc Guire der.h...@hofr.at --- drivers/macintosh/ams/ams-pmu.c |4 ++-- drivers/misc/sgi-gru/grukservices.c |2 +- drivers/scsi/aha152x.c|2 +- drivers/usb/gadget/udc/fsl_qe_udc.c |2 +- drivers/usb/gadget/udc/fsl_udc_core.c

[PATCH] gadget: cleanup on stack DECLARE_COMPLETIONs

2014-12-23 Thread Nicholas Mc Guire
fixups for incorrect use of DECLARE_COMPLETION. see also commit 6e9a4738 (completions: lockdep annotate on stack completions) patch is against 3.18.0 linux-next This was only code reviewed and compile tested Signed-off-by: Nicholas Mc Guire der.h...@hofr.at --- drivers/usb/gadget/udc