Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 13:25 GMT-03:00 Greg Kroah-Hartman : > On Wed, Dec 02, 2015 at 05:43:11PM -0300, Geyslan G. Bem wrote: >> Replace dma_pool_alloc and memset with a single call to dma_pool_zalloc. >> >> Caught by coccinelle. >> >> Signed-off-by: Geyslan G. Bem >> -

Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 13:44 GMT-03:00 Greg Kroah-Hartman : > On Fri, Dec 04, 2015 at 01:33:18PM -0300, Geyslan G. Bem wrote: >> >> If you wish, you could list me subsystems in need of maintenance. > > I don't understand what you mean by this. I meant that would be great to know w

Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 14:18 GMT-03:00 Greg Kroah-Hartman : > On Fri, Dec 04, 2015 at 02:13:35PM -0300, Geyslan G. Bem wrote: >> 2015-12-04 13:44 GMT-03:00 Greg Kroah-Hartman : >> > On Fri, Dec 04, 2015 at 01:33:18PM -0300, Geyslan G. Bem wrote: >> >> >> >> If you wis

[RFC] usb: coccinelle and checkpatch cleanup

2015-12-04 Thread Geyslan G. Bem
While applying the "scripts/coccinelle/misc/compare_const_fl.cocci" in usb/host/ tree I found files that deserve almost a full cleanup (very wrong coding style). Eg. drivers/usb/host/ohci-dbg.c Can I do a full cleaning or only coccinelle patches? -- Regards, Geyslan G. Bem hacki

[PATCH] usb: host: iounmap before return

2015-12-06 Thread Geyslan G. Bem
This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not unmapping correctly. Coccinelle: scripts/coccinelle/free/iounmap.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/pci-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d

Re: [RFC] usb: coccinelle and checkpatch cleanup

2015-12-06 Thread Geyslan G. Bem
2015-12-04 18:55 GMT-03:00 Geyslan G. Bem : > While applying the "scripts/coccinelle/misc/compare_const_fl.cocci" in > usb/host/ tree I found files that deserve almost a full cleanup (very > wrong coding style). Eg. drivers/usb/host/ohci-dbg.c By wrong coding style I meant chec

Re: [PATCH] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
2015-12-07 6:30 GMT-03:00 Lu Baolu : > > > On 12/06/2015 09:47 PM, Geyslan G. Bem wrote: >> This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not >> unmapping correctly. >> >> Coccinelle: scripts/coccinelle/free/iounma

[PATCH v2] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not unmapping correctly. Coccinelle: scripts/coccinelle/free/iounmap.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/pci-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

Re: [PATCH] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
2015-12-07 8:37 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/07/2015 12:30 PM, Lu Baolu wrote: > >>> This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not >>> unmapping correctly. >>> >>> Coccinelle: scripts/coccinell

[PATCH 4/4] usb: host: ehci.h: use flexible array instead of zero-length array

2015-12-09 Thread Geyslan G. Bem
C99 standardized flexible arrays 'array[]'. The zero-length ones are old gcc implementation 'array[0]'. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/u

[PATCH 2/4] usb: host: ehci.h: cleanup header file

2015-12-09 Thread Geyslan G. Bem
This patch does align function/macro definitions. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index a4f5ab5..0daed80 100644 --- a/drivers

[PATCH 3/4] usb: host: ehci.h: remove duplicated return

2015-12-09 Thread Geyslan G. Bem
This patch removes the return of the default switch case, since 'ehci_port_speed()' already has the same default return. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci.h b/driver

[PATCH 1/4] usb: host: ehci.h: cleanup header file

2015-12-09 Thread Geyslan G. Bem
This patch silences - A coccinelle warning 'scripts/coccinelle/misc/compare_const_fl.cocci' - All the errors and many warnings shown by checkpatch Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 89 + 1 file changed, 45

Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return

2015-12-09 Thread Geyslan G. Bem
2015-12-09 17:10 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/09/2015 10:57 PM, Geyslan G. Bem wrote: > >> This patch removes the return of the default switch case, since >> 'ehci_port_speed()' already has the same default return. >> >> Signed-off-by

Re: [PATCH 2/4] usb: host: ehci.h: cleanup header file

2015-12-09 Thread Geyslan G. Bem
2015-12-09 17:11 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/09/2015 10:57 PM, Geyslan G. Bem wrote: > >> This patch does align function/macro definitions. >> >> Signed-off-by: Geyslan G. Bem > > > USB code just uses different alignment style (2 ta

Re: [PATCH 1/4] usb: host: ehci.h: cleanup header file

2015-12-09 Thread Geyslan G. Bem
2015-12-09 17:09 GMT-03:00 Greg Kroah-Hartman : > On Wed, Dec 09, 2015 at 04:57:30PM -0300, Geyslan G. Bem wrote: >> This patch silences >> - A coccinelle warning 'scripts/coccinelle/misc/compare_const_fl.cocci' >> - All the errors and many warnings shown b

Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return

2015-12-09 Thread Geyslan G. Bem
2015-12-09 18:24 GMT-03:00 kbuild test robot : > Hi Geyslan, > > [auto build test ERROR on usb/usb-testing] > [also build test ERROR on v4.4-rc4 next-20151209] > > url: > https://github.com/0day-ci/linux/commits/Geyslan-G-Bem/usb-host-ehci-h-cleanup-header-file/20151210-0

[PATCH 6/9] usb: host: ehci.h: use space after comma

2015-12-09 Thread Geyslan G. Bem
Put space after comma. This patch also changes QH_NEXT macro for better reading. Caught by cppcheck: "ERROR: space required after that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH 9/9] usb: host: ehci.h: move constant to right

2015-12-09 Thread Geyslan G. Bem
This patch moves the constant 0x3ff to right and put spaces in the right shift. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host

[PATCH 8/9] usb: host: ehci.h: move pointer operator to name side

2015-12-09 Thread Geyslan G. Bem
The pointer operator must be sticked to name. Caught by cppcheck: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci.h b/drivers/u

[PATCH 7/9] usb: host: ehci.h: remove macros trailing semicolon

2015-12-09 Thread Geyslan G. Bem
Removes trailing semicolon from macros. Caught by cppcheck: "WARNING: macros should not use a trailing semicolon" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/h

[PATCH 4/9] usb: host: ehci.h: fix single statement macros

2015-12-09 Thread Geyslan G. Bem
Don't use the 'do {} while (0)' wrapper in a single statement macro. Caught by cppcheck: "WARNING: Single statement macros should not use a do {} while (0) loop" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH 1/9] usb: host: ehci.h: remove space before comma

2015-12-09 Thread Geyslan G. Bem
Get rid of spaces before comma. Caught by cppcheck: "ERROR: space prohibited before that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/

[PATCH 3/9] usb: host: ehci.h: remove space before open square bracket

2015-12-09 Thread Geyslan G. Bem
Get rid of space before open square bracket. Caught by cppcheck: "ERROR: space prohibited before open square bracket '['" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dri

[PATCH 2/9] usb: host: ehci.h: remove space before function open parenthesis

2015-12-09 Thread Geyslan G. Bem
Get rid of space between function name and open parenthesis. Caught by cppcheck: "WARNING: space prohibited between function name and open parenthesis '('" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 22 +++--- 1 file changed, 11 inserti

[PATCH 5/9] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-09 Thread Geyslan G. Bem
Prefer to use __aligned(size) macro instead of __attribute__((aligned(size))). Caught by cppcheck: "WARNING" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci.h b/driver

[PATCH 2/9v2] usb: host: ehci.h: remove space before function open parenthesis

2015-12-09 Thread Geyslan G. Bem
Get rid of space between function name and open parenthesis. Caught by checkpatch: "WARNING: space prohibited between function name and open parenthesis '('" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 22 +++--- 1 file changed, 11 inserti

[PATCH 3/9v2] usb: host: ehci.h: remove space before open square bracket

2015-12-09 Thread Geyslan G. Bem
Get rid of space before open square bracket. Caught by checkpatch: "ERROR: space prohibited before open square bracket '['" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --gi

[PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-09 Thread Geyslan G. Bem
Put space after comma. This patch also changes QH_NEXT macro for better reading. Caught by checkpatch: "ERROR: space required after that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH 8/9v2] usb: host: ehci.h: move pointer operator to name side

2015-12-09 Thread Geyslan G. Bem
The pointer operator must be sticked to name. Caught by checkpatch: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci.h b/drivers/u

[PATCH 7/9v2] usb: host: ehci.h: remove macros trailing semicolon

2015-12-09 Thread Geyslan G. Bem
Removes trailing semicolon from macros. Caught by checkpatch: "WARNING: macros should not use a trailing semicolon" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci.h b/driver

[PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-09 Thread Geyslan G. Bem
Prefer to use __aligned(size) macro instead of __attribute__((aligned(size))). Caught by checkpatch: "WARNING" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci.h b/driver

[PATCH 1/9v2] usb: host: ehci.h: remove space before comma

2015-12-09 Thread Geyslan G. Bem
Get rid of spaces before comma. Caught by checkpatch: "ERROR: space prohibited before that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/

[PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-09 Thread Geyslan G. Bem
Don't use the 'do {} while (0)' wrapper in a single statement macro. Caught by checkpatch: "WARNING: Single statement macros should not use a do {} while (0) loop" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH] usb: remove redundant conditions

2015-12-09 Thread Geyslan G. Bem
This patch removes redundant conditions. - (!A || (A && B)) is the same as (!A || B). - (length && length > 5) can be reduced to a single evaluation. Caught by: cppcheck Signed-off-by: Geyslan G. Bem --- drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- drivers/usb/host/fhc

Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-10 Thread Geyslan G. Bem
2015-12-10 7:01 GMT-03:00 Peter Senna Tschudin : > On Wed, Dec 09, 2015 at 07:32:34PM -0300, Geyslan G. Bem wrote: >> Prefer to use __aligned(size) macro instead of >> __attribute__((aligned(size))). >> >> Caught by checkpatch: "WARNING" > Not sure about

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 7:44 GMT-03:00 Johan Hovold : > On Wed, Dec 09, 2015 at 10:52:42PM -0300, Geyslan G. Bem wrote: >> This patch removes redundant conditions. >> >> - (!A || (A && B)) is the same as (!A || B). >> - (length && length > 5) can be reduced to

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
2015-12-10 8:54 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/10/2015 1:32 AM, Geyslan G. Bem wrote: > >> Don't use the 'do {} while (0)' wrapper in a single statement macro. >> >> Caught by checkpatch: "WARNING: Single statement macros should n

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
2015-12-10 9:20 GMT-03:00 Geyslan G. Bem : > 2015-12-10 8:54 GMT-03:00 Sergei Shtylyov > : >> Hello. >> >> On 12/10/2015 1:32 AM, Geyslan G. Bem wrote: >> >>> Don't use the 'do {} while (0)' wrapper in a single statement macro. >>&

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
2015-12-10 11:44 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 04:05 PM, Geyslan G. Bem wrote: > >>>>> Don't use the 'do {} while (0)' wrapper in a single statement macro. >>>>> >>>>> Caught by checkpatch: "WARNI

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 11:50 GMT-03:00 Felipe Balbi : > > Hi, > > "Geyslan G. Bem" writes: >> This patch removes redundant conditions. >> >> - (!A || (A && B)) is the same as (!A || B). >> - (length && length > 5) can be reduced to a single e

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:13 GMT-03:00 Felipe Balbi : > "Geyslan G. Bem" writes: > >> This patch removes redundant conditions. >> >> - (!A || (A && B)) is the same as (!A || B). >> - (length && length > 5) can be reduced to a single evaluation. &g

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:17 GMT-03:00 David Laight : > From: Felipe Balbi >> Sent: 10 December 2015 15:14 >> "Geyslan G. Bem" writes: >> >> > This patch removes redundant conditions. >> > >> > - (!A || (A && B)) is the same as (!A || B). &g

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:29 GMT-03:00 Geyslan G. Bem : > 2015-12-10 12:17 GMT-03:00 David Laight : >> From: Felipe Balbi >>> Sent: 10 December 2015 15:14 >>> "Geyslan G. Bem" writes: >>> >>> > This patch removes redundant conditions. >>> >

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Geyslan G. Bem
e the other 7 -- I > never received 9/9v2 (the original 9/9 was okay). Alan, The 9 is v1 only, since it mentions the tool (coccinelle) correctly. Tks. > > Alan Stern > -- Regards, Geyslan G. Bem hackingbits.com -- To unsubscribe from this list: send the line "unsub

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
2015-12-10 14:26 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 05:56 PM, Geyslan G. Bem wrote: > >>>>>>> Don't use the 'do {} while (0)' wrapper in a single statement macro. >>>>>>> >>>>>>> Caught by checkpa

Re: [PATCH 4/9v2] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
2015-12-10 14:47 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 08:40 PM, Geyslan G. Bem wrote: > >>>>>>>>> Don't use the 'do {} while (0)' wrapper in a single statement >>>>>>>>> macro. >>>>>>>>> &g

[PATCH v3 4/9] usb: host: ehci.h: fix single statement macros

2015-12-10 Thread Geyslan G. Bem
Don't use the 'do {} while (0)' wrapper in a single statement macro. Caught by checkpatch: "WARNING: Single statement macros should not use a do {} while (0) loop" Signed-off-by: Geyslan G. Bem --- Change in v3: - There's no need to evaluate COUNT(x) in #ifdef EH

[PATCH 2/4] usb: gadget: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/ga

[PATCH 4/4] usb: musb: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Fixes indentation too. Tested by: compilation only Caught by: cppcheck Signed-off-by: Geyslan G. Bem --- drivers/usb/musb/musb_gadget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH 1/4] usb: serial: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant conditions. (!A || (A && B)) is the same as (!A || B). (length && length > 5) can be reduced to a single evaluation. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/serial

[PATCH 3/4] usb: host: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/fhci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fhci

[PATCH] usb: ehci: refactor scan_isoc function

2015-12-10 Thread Geyslan G. Bem
ned-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 203 ++ 1 file changed, 104 insertions(+), 99 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index f9a3327..c6e9731 100644 --- a/drivers/usb/host/eh

[PATCH v2] usb: ehci: refactor scan_isoc function

2015-12-10 Thread Geyslan G. Bem
efactoring Signed-off-by: Geyslan G. Bem --- v2: fixes coding style (removes spaces before parens and open brackets) --- drivers/usb/host/ehci-sched.c | 203 ++ 1 file changed, 104 insertions(+), 99 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/d

Re: [PATCH 1/4] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
2015-12-11 6:16 GMT-03:00 Johan Hovold : > On Thu, Dec 10, 2015 at 05:50:09PM -0300, Geyslan G. Bem wrote: >> This patch removes redundant conditions. >> >> (!A || (A && B)) is the same as (!A || B). >> (length && length > 5) can be reduced to a

[PATCH 2/2] usb: serial: remove redundant condition

2015-12-11 Thread Geyslan G. Bem
This patch removes redundant condition. (length && length > 5) can be reduced to a single evaluation. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/serial/mos7840.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
This patch removes redundant conditions. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/serial/io_edgeport.c | 35 ++- 1 file changed, 14 insertions(+), 21 d

Re: [PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
2015-12-11 7:13 GMT-03:00 Johan Hovold : > On Fri, Dec 11, 2015 at 06:46:41AM -0300, Geyslan G. Bem wrote: >> This patch removes redundant conditions. >> >> (!A || (A && B)) is the same as (!A || B). >> >> Tested by compilation only. >> Caught b

Re: [PATCH 2/2] usb: serial: remove redundant condition

2015-12-11 Thread Geyslan G. Bem
2015-12-11 9:30 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/11/2015 12:46 PM, Geyslan G. Bem wrote: > >It's a bad idea to send 2 different patches with the same subject. I'd > use "mos7840: " as a prefix in this case. Sergei, tks for the advice. Johan

Re: [PATCH v2] usb: ehci: refactor scan_isoc function

2015-12-11 Thread Geyslan G. Bem
2015-12-10 21:55 GMT-03:00 Geyslan G. Bem : > This patch removes an infinite for loop and makes use of the already > existing 'restart' tag, reducing one leading tab. > > The comments and code were corrected conforming coding style. > > Tested by compilation

Re: [PATCH v3 4/9] usb: host: ehci.h: fix single statement macros

2015-12-11 Thread Geyslan G. Bem
2015-12-11 13:30 GMT-03:00 Greg Kroah-Hartman : > On Thu, Dec 10, 2015 at 03:18:19PM -0300, Geyslan G. Bem wrote: >> Don't use the 'do {} while (0)' wrapper in a single statement macro. >> >> Caught by checkpatch: "WARNING: Single statement macros

[PATCH resend 5/9] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-11 Thread Geyslan G. Bem
Prefer to use __aligned(size) macro instead of __attribute__((aligned(size))). Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index

[PATCH resend 6/9] usb: host: ehci.h: use space after comma

2015-12-11 Thread Geyslan G. Bem
Put space after comma. This patch also changes QH_NEXT macro for better reading. Caught by checkpatch: "ERROR: space required after that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH resend 7/9] usb: host: ehci.h: remove macros trailing semicolon

2015-12-11 Thread Geyslan G. Bem
Removes trailing semicolon from macros. Caught by checkpatch: "WARNING: macros should not use a trailing semicolon" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci.h b/driver

[PATCH resend 9/9] usb: host: ehci.h: move constant to right

2015-12-11 Thread Geyslan G. Bem
This patch moves the constant 0x3ff to right and put spaces in the right shift. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host

[PATCH resend 8/9] usb: host: ehci.h: move pointer operator to name side

2015-12-11 Thread Geyslan G. Bem
The pointer operator must be sticked to name. Caught by checkpatch: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci.h b/drivers/u

[PATCH resend 2/9] usb: host: ehci.h: remove space before function open parenthesis

2015-12-11 Thread Geyslan G. Bem
Get rid of space between function name and open parenthesis. Caught by checkpatch: "WARNING: space prohibited between function name and open parenthesis '('" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 22 +++--- 1 file changed, 11 inserti

[PATCH resend 3/9] usb: host: ehci.h: remove space before open square bracket

2015-12-11 Thread Geyslan G. Bem
Get rid of space before open square bracket. Caught by checkpatch: "ERROR: space prohibited before open square bracket '['" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --gi

[PATCH resend 4/9] usb: host: ehci.h: fix single statement macros

2015-12-11 Thread Geyslan G. Bem
Don't use the 'do {} while (0)' wrapper in a single statement macro. Caught by checkpatch: "WARNING: Single statement macros should not use a do {} while (0) loop" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH resend 1/9] usb: host: ehci.h: remove space before comma

2015-12-11 Thread Geyslan G. Bem
Get rid of spaces before comma. Caught by checkpatch: "ERROR: space prohibited before that ','" Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/

[PATCH resend 0/9] usb: host: ehci.h cleanup

2015-12-11 Thread Geyslan G. Bem
This cleanup was done with the help of checkpatch and coccinelle tools. Geyslan G. Bem (9): usb: host: ehci.h: remove space before comma usb: host: ehci.h: remove space before function open parenthesis usb: host: ehci.h: remove space before open square bracket usb: host: ehci.h: fix

Re: [PATCH v3 4/9] usb: host: ehci.h: fix single statement macros

2015-12-11 Thread Geyslan G. Bem
2015-12-11 17:55 GMT-03:00 Geyslan G. Bem : > 2015-12-11 13:30 GMT-03:00 Greg Kroah-Hartman : >> On Thu, Dec 10, 2015 at 03:18:19PM -0300, Geyslan G. Bem wrote: >>> Don't use the 'do {} while (0)' wrapper in a single statement macro. >>> >>> Caug

[PATCH 04/10] usb: host: ehci-sched: add spaces around operators

2015-12-11 Thread Geyslan G. Bem
This patch adds spaces around operators. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index

[PATCH 10/10] usb: host: ehci-sched: remove unnecessary braces

2015-12-11 Thread Geyslan G. Bem
This patch removes unnecessary braces in single statement blocks at the same time as replaces the if statement with a ternary conditional. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 6 +- 1 file changed, 1 insertion

[PATCH 07/10] usb: host: ehci-sched: use C89-style comments

2015-12-11 Thread Geyslan G. Bem
This patch changes comments conforming coding style. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci

[PATCH 09/10] usb: host: ehci-sched: use sizeof operator with parens

2015-12-11 Thread Geyslan G. Bem
This patch adds parens to sizeof operator uses. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci

[PATCH 08/10] usb: host: ehci-sched: add line after declarations

2015-12-11 Thread Geyslan G. Bem
This patch adds a blank line after declarations. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index cf203d6..2e7d20f 100644 --- a/drivers

[PATCH 06/10] usb: host: ehci-sched: remove useless else branch

2015-12-11 Thread Geyslan G. Bem
This patch removes an useless else branch after a break, reducing one indent block. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci

[PATCH 05/10] usb: host: ehci-sched: remove prohibited spaces

2015-12-11 Thread Geyslan G. Bem
This patch removes prohibited spaces before open parenthesis and open brackets. It also removes an assignment inside condition and unnecessary braces in single statement block. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c

[PATCH 03/10] usb: host: ehci-sched: remove useless assignments

2015-12-11 Thread Geyslan G. Bem
This patch removes useless assignments. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index

[PATCH 01/10] usb: host: ehci-sched: refactor scan_isoc function

2015-12-11 Thread Geyslan G. Bem
tabs - consider code refactoring Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 203 ++ 1 file changed, 104 insertions(+), 99 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index f9a3327..86b2484 1006

[PATCH 00/10] usb: host: ehci-sched: cleanup

2015-12-11 Thread Geyslan G. Bem
Cleanup done with the help of coccinelle, checkpatch and cppcheck tools. Geyslan G. Bem (10): usb: host: ehci-sched: refactor scan_isoc function usb: host: ehci-sched: move constants to right usb: host: ehci-sched: remove useless assignments usb: host: ehci-sched: add spaces around

[PATCH 02/10] usb: host: ehci-sched: move constants to right

2015-12-11 Thread Geyslan G. Bem
This patch moves the constants to right. Tested by compilation only. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host

[PATCH] usb: host: ehci-sched: silence checkpatch warning

2015-12-11 Thread Geyslan G. Bem
This patch moves comment into the else branch avoiding the following misleading warning. "braces {} are not necessary for single statement blocks" Caught by checkpatch. Signed-off-by: Geyslan G. Bem Suggested-by: Joe Perches --- drivers/usb/host/ehci-sched.c | 7 ++- 1 file

Re: [PATCH] usb: host: ehci-sched: silence checkpatch warning

2015-12-11 Thread Geyslan G. Bem
2015-12-11 22:50 GMT-03:00 Geyslan G. Bem : > This patch moves comment into the else branch avoiding the following > misleading warning. > > "braces {} are not necessary for single statement blocks" > > Caught by checkpatch. > > Signed-off-by: Geyslan G

Re: [PATCH 03/10] usb: host: ehci-sched: remove useless assignments

2015-12-12 Thread Geyslan G. Bem
2015-12-12 11:48 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/12/2015 4:19 AM, Geyslan G. Bem wrote: > >> This patch removes useless assignments. > > >Initializers, you mean? You're right. Fixing. > >> Tested by compilation only. >> Caught b

Re: [PATCH 10/10] usb: host: ehci-sched: remove unnecessary braces

2015-12-12 Thread Geyslan G. Bem
2015-12-12 11:50 GMT-03:00 Sergei Shtylyov : > On 12/12/2015 4:19 AM, Geyslan G. Bem wrote: > >> This patch removes unnecessary braces in single statement blocks at the >> same time as replaces the if statement with a ternary conditional. >> >> Tested by compilation

Re: [PATCH] usb: host: ehci-sched: silence checkpatch warning

2015-12-12 Thread Geyslan G. Bem
Hello, 2015-12-12 13:19 GMT-03:00 Alan Stern : > On Fri, 11 Dec 2015, Geyslan G. Bem wrote: > >> This patch moves comment into the else branch avoiding the following >> misleading warning. >> >> "braces {} are not necessary for single statement blocks" >

Re: [PATCH 01/10] usb: host: ehci-sched: refactor scan_isoc function

2015-12-12 Thread Geyslan G. Bem
2015-12-12 13:15 GMT-03:00 Alan Stern : > On Fri, 11 Dec 2015, Geyslan G. Bem wrote: > >> This patch removes an infinite 'for' loop and makes use of the already >> existing 'restart' tag instead, reducing one leading tab. >> >> The commen

[PATCH v2 09/10] usb: host: ehci-sched: use sizeof operator with parens

2015-12-12 Thread Geyslan G. Bem
This patch adds parens to sizeof operator uses. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci

[PATCH v2 10/10] usb: host: ehci-sched: remove unnecessary braces

2015-12-12 Thread Geyslan G. Bem
This patch removes unnecessary braces in single statement blocks at the same time as replaces the if statement with a ternary conditional. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- v2: removes unnecessary parens in ternary conditional. --- drivers

[PATCH v2 08/10] usb: host: ehci-sched: add line after declarations

2015-12-12 Thread Geyslan G. Bem
This patch adds a blank line after declarations. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 00d1932..ff6319b 100644 --- a/drivers

[PATCH v2 07/10] usb: host: ehci-sched: use C89-style comments

2015-12-12 Thread Geyslan G. Bem
This patch changes comments conforming coding style. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci

[PATCH v2 06/10] usb: host: ehci-sched: remove useless else branch

2015-12-12 Thread Geyslan G. Bem
This patch removes an useless else branch after a break, reducing one indent block. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci

[PATCH v2 03/10] usb: host: ehci-sched: remove useless initializations

2015-12-12 Thread Geyslan G. Bem
This patch removes useless initializations. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- v2: replaces 'assignments' with 'initializations' --- drivers/usb/host/ehci-sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v2 05/10] usb: host: ehci-sched: remove prohibited spaces

2015-12-12 Thread Geyslan G. Bem
This patch removes prohibited spaces before open parenthesis and open brackets. It also removes an assignment inside condition and unnecessary braces in single statement block. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c

[PATCH v2 04/10] usb: host: ehci-sched: add spaces around operators

2015-12-12 Thread Geyslan G. Bem
This patch adds spaces around operators. Tested by compilation only. Caught by checkpatch. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index

[PATCH v2 01/10] usb: host: ehci-sched: refactor scan_isoc function

2015-12-12 Thread Geyslan G. Bem
live && ((frame == now_frame) || ... The comments and code were corrected conforming file coding style. Tested by compilation only. Caught by checkpatch: WARNING: Too many leading tabs - consider code refactoring Signed-off-by: Geyslan G. Bem --- v2: Fixes file coding indentation.

[PATCH v2 02/10] usb: host: ehci-sched: move constants to right

2015-12-12 Thread Geyslan G. Bem
This patch moves the constants to right. Tested by compilation only. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host

[PATCH v2 00/10] usb: host: ehci-sched: cleanup

2015-12-12 Thread Geyslan G. Bem
Cleanup done with the help of coccinelle, checkpatch and cppcheck tools. Geyslan G. Bem (10): usb: host: ehci-sched: refactor scan_isoc function usb: host: ehci-sched: move constants to right usb: host: ehci-sched: remove useless initializations usb: host: ehci-sched: add spaces around

  1   2   3   >