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
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
> >
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
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
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
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/
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
*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/
*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/
Applied your notice. Sent v2 patch.
--
Eugene
> > *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
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
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/
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
> 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
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
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 `
17 matches
Mail list logo