Re: [PATCH] usb: gadget: f_fs: use memdup_user

2017-05-20 Thread Al Viro
On Sat, May 13, 2017 at 11:05:30AM +0300, Dan Carpenter wrote: > > + data = memdup_user(buf, len); > > + if (unlikely(IS_ERR(data))) > > Don't use likely/unlikely() here. It's not a fast path. More to the point, #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned

Re: [PATCH] usb: mtu3: cleanup with list_first_entry_or_null()

2017-05-20 Thread Greg Kroah-Hartman
On Sun, May 21, 2017 at 02:05:31AM +0900, Masahiro Yamada wrote: > The combo of list_empty() and list_first_entry() can be replaced with > list_first_entry_or_null(). > > Signed-off-by: Masahiro Yamada > --- > > drivers/usb/mtu3/mtu3.h | 8 ++-- > 1 file

Re: [PATCH] usb: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
2017-05-21 2:52 GMT+09:00 Masahiro Yamada : > After long term efforts of fixing non-common clock implementations, > clk_disable() is a no-op for a NULL pointer input, and this is now > tree-wide consistent. > > All clock consumers can safely call

[PATCH] usb: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
After long term efforts of fixing non-common clock implementations, clk_disable() is a no-op for a NULL pointer input, and this is now tree-wide consistent. All clock consumers can safely call clk_disable(_unprepare) without NULL pointer check. Signed-off-by: Masahiro Yamada

[PATCH] usb: mtu3: cleanup with list_first_entry_or_null()

2017-05-20 Thread Masahiro Yamada
The combo of list_empty() and list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada --- drivers/usb/mtu3/mtu3.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h

Re: [REGRESSION] Failed network caused by: xhci: switch to pci_alloc_irq_vectors

2017-05-20 Thread Christoph Hellwig
On Sat, May 20, 2017 at 09:49:56AM -0700, Linus Torvalds wrote: > Side note: why is it doing that " > 1" check, when any value _other_ > than 1 is wrong? It's the same effect, so either one is fine with me. > Also, to match the non-MSI implementation, wouldn't it be nicer to > just write it that

Re: [REGRESSION] Failed network caused by: xhci: switch to pci_alloc_irq_vectors

2017-05-20 Thread Linus Torvalds
On Fri, May 19, 2017 at 5:46 AM, Christoph Hellwig wrote: > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 33c2b0b77429..5a7fd3b6a7b9 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1342,7 +1342,7 @@ pci_alloc_irq_vectors_affinity(struct pci_dev

[GIT PULL] USB driver fixes for 4.12-rc2

2017-05-20 Thread Greg KH
The following changes since commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6: Linux 4.12-rc1 (2017-05-13 13:19:49 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.12-rc2 for you to fetch changes up to

[v2 1/1] usb:host:xhci support option to disable xHCI 1.0 USB2 HW LPM

2017-05-20 Thread Thang Q. Nguyen
XHCI specification 1.1 does not require xHCI 1.0 compliant controllers to always enable hardware USB2 LPM. However, the current xHCI driver always enable it by setting HLE=1 when seeing HLC=1. This makes certain xHCI controllers that have broken USB2 HW LPM fail to work as there is no way to