[PATCH v6] ehci: fix EHCI host controller initialization sequence

2021-01-10 Thread Eugene Korenevsky
gLink). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211095 Acked-by: Alan Stern Signed-off-by: Eugene Korenevsky --- v1: initial patch v2: add BugLink tag v3: add Revieved-By tags (incorrect), restore `msleep(5)` v4: remove Reviewed-By tags, restore reading from USBCMD prior to msleep, a

Re: [PATCH v2] USB hub_probe: remove ugly goto-into-compound-statement

2016-11-07 Thread Eugene Korenevsky
On Mon, Nov 07, 2016 at 10:09:17AM +0100, Greg Kroah-Hartman wrote: > > Rework smelling code (goto inside compound statement). Perhaps this is > > legacy. > > Anyway such code is not appropriate for Linux kernel. > > > > Signed-off-by: Eugene Korenevsky > >

[PATCH v3 1/2] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-07 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git

[PATCH v3 2/2] USB hub_probe: put initialization before usage

2016-11-07 Thread Eugene Korenevsky
Minor optimization: move initialization immediately before usage. This gives a chance for more accurate register allocation by the compiler. Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b

[PATCH v3] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-08 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Changes since v2: extract the code to static function Changes since v1: fix spaces instead of tab, add missing 'Signed-off-by' Signed-off-by: Eugene

[PATCH v4] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-09 Thread Eugene Korenevsky
7; Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index cbb1467..b770c8d 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/

[PATCH v5] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-13 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- Changes in v5: make `bool` a return type of `hub_check_descriptor_sanity()` Changes in v4: fix typo Changes in v3: extract the

[PATCH] EFI loader: remove dead code

2016-11-01 Thread Eugene Korenevsky
*e820ext is always NULL in 'alloc_e820ext()' (see the code of 'exit_boot()'). Therefore the 'if' condition is always false and the entire 'if' statement is pointless. Remove it. --- arch/x86/boot/compressed/eboot.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/x86/boot/compressed/

[PATCH v2] EFI loader: remove redundant code

2016-11-01 Thread Eugene Korenevsky
*e820ext is always NULL in 'alloc_e820ext()' (see the code of 'exit_boot()'). Without loss of generality we can replace freeing with returning EFI_INVALID_PARAMETER. So if the caller would ever incorrectly pass non-NULL *e820ext, he will obtain a returned error code. --- arch/x86/boot/compressed/

Re: [PATCH] EFI loader: remove dead code

2016-11-01 Thread Eugene Korenevsky
Applied your notice. Sent v2 patch. -- Eugene

Re: [PATCH v2] EFI loader: remove redundant code

2016-11-02 Thread Eugene Korenevsky
> > *e820ext is always NULL in 'alloc_e820ext()' (see the code of > > 'exit_boot()'). > > Without loss of generality we can replace freeing with returning > > EFI_INVALID_PARAMETER. So if the caller would ever incorrectly pass non-NULL > > *e820ext, he will obtain a returned error code. > > > > W

[PATCH] EFI loader: remove pointless "if" statement

2016-11-02 Thread Eugene Korenevsky
An obvious cleanup. "if" statement does nothing and should be removed. --- arch/x86/boot/compressed/eboot.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index cc69e37..202f2aa 100644 --- a/arch/x86/boo

[PATCH] USB hub_probe: refactor ugly goto-into-compound-statement

2016-11-02 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. --- drivers/usb/core/hub.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/

[PATCH v2] USB hub_probe: remove ugly goto-into-compound-statement

2016-11-02 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- drivers/usb/core/hub.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers

Re: [PATCH v5] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-18 Thread Eugene Korenevsky
> Ok, I'm going to be really pedantic here and ask that you spell this > last statement out: >if (usb...) > return true; >return false; > > Also, the comment should say: > /* If the first endpoint is not interrupt IN, we... */ > It's better to inverse the

[PATCH v6] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-18 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- Changes in v6: more pedantic conversion from `int` to `bool`; fix comment Changes in v5: make `bool` a return type of

[PATCH] [PATCH v7] USB hub_probe: rework ugly goto-into-compound-statement

2017-06-25 Thread Eugene Korenevsky
Rework smelling code (goto inside compound statement). Perhaps this is legacy. Anyway such code is not appropriate for Linux kernel. Signed-off-by: Eugene Korenevsky --- Changes in v7: rename hub_check_descriptor_sanity -> hub_descriptor_is_sane Changes in v6: more pedantic conversion from `