[PATCH] documentation: add kernel-dot.emacs.txt

2016-02-16 Thread Geyslan G. Bem
This patch adds kernel-dot-emacs.txt (elisp) which deliver best indentation, comments and white space highlighting functionalities. This also changes the CodingStyle and 00-INDEX files by referencing the new kernel-dot-emacs. Signed-off-by: Geyslan G. Bem Reviewed-by: Tiago Natel de Moura

Re: [PATCH] documentation: add kernel-dot.emacs.txt

2016-02-16 Thread Geyslan G. Bem
best > indentation, comments and white space highlighting functionalities. > > This also changes the CodingStyle and 00-INDEX files by referencing > the new kernel-dot-emacs. > > Signed-off-by: Geyslan G. Bem > --- > > Notes: > This patch was done by suggestion of Jon

Re: [PATCH] documentation: add kernel-dot.emacs.txt

2016-02-11 Thread Geyslan G. Bem
Hello, ping... 2016-01-27 19:51 GMT-03:00 Geyslan G. Bem : > This patch adds kernel-dot-emacs.txt (elisp) which deliver best > indentation, comments and white space highlighting functionalities. > > This also changes the CodingStyle and 00-INDEX files by referencing > the new k

[PATCH] documentation: add kernel-dot.emacs.txt

2016-01-27 Thread Geyslan G. Bem
This patch adds kernel-dot-emacs.txt (elisp) which deliver best indentation, comments and white space highlighting functionalities. This also changes the CodingStyle and 00-INDEX files by referencing the new kernel-dot-emacs. Signed-off-by: Geyslan G. Bem --- Notes: This patch was done by

Re: [PATCH] checkpatch: fix left brace warning

2016-01-26 Thread Geyslan G. Bem
Hello, 2015-12-30 12:49 GMT-03:00 Geyslan G. Bem : > This patch escapes a regex that uses left brace. > > Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped > left brace in regex is deprecated, passed through in regex;" > > Comment from regcomp.c i

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

2016-01-25 Thread Geyslan G. Bem
2016-01-25 19:18 GMT-03:00 Geyslan G. Bem : > 2016-01-25 17:40 GMT-03:00 Alan Stern : >> On Mon, 25 Jan 2016, Geyslan G. Bem wrote: >> >>> 2016-01-25 17:08 GMT-03:00 Alan Stern : >>> > On Mon, 25 Jan 2016, Geyslan G. Bem wrote: >>> > >>> &g

Re: [RFC PATCH] codingstyle: improve elisp for a better experience

2016-01-25 Thread Geyslan G. Bem
2016-01-25 17:01 GMT-03:00 Jonathan Corbet : > On Thu, 21 Jan 2016 22:18:30 -0300 > "Geyslan G. Bem" wrote: > >> This patch does use of more emacs functionalities which deliver to the >> user indentation, commenting and white space highlighting. > > So perh

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

2016-01-25 Thread Geyslan G. Bem
2016-01-25 17:40 GMT-03:00 Alan Stern : > On Mon, 25 Jan 2016, Geyslan G. Bem wrote: > >> 2016-01-25 17:08 GMT-03:00 Alan Stern : >> > On Mon, 25 Jan 2016, Geyslan G. Bem wrote: >> > >> >> Ok Greg, there was three patchset versions for this file that wou

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

2016-01-25 Thread Geyslan G. Bem
2016-01-25 17:08 GMT-03:00 Alan Stern : > On Mon, 25 Jan 2016, Geyslan G. Bem wrote: > >> Ok Greg, there was three patchset versions for this file that would >> count over 40+ emails. This is v3. I didn't find any answer with ack >> for it. >> About sending, the

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

2016-01-25 Thread Geyslan G. Bem
2016-01-25 16:56 GMT-03:00 Greg Kroah-Hartman : > On Mon, Jan 25, 2016 at 04:52:52PM -0300, Geyslan G. Bem wrote: >> 2016-01-25 0:30 GMT-03:00 Greg Kroah-Hartman : >> > On Thu, Dec 24, 2015 at 01:03:39PM -0300, Geyslan G. Bem wrote: >> >> 2015-12-13

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

2016-01-25 Thread Geyslan G. Bem
2016-01-25 0:30 GMT-03:00 Greg Kroah-Hartman : > On Thu, Dec 24, 2015 at 01:03:39PM -0300, Geyslan G. Bem wrote: >> 2015-12-13 13:59 GMT-03:00 Geyslan G. Bem : >> > >> > Cleanup done with the help of coccinelle, checkpatch and cppcheck tools. >> > >> >

[RFC PATCH] codingstyle: improve elisp for a better experience

2016-01-21 Thread Geyslan G. Bem
to be released emacs-25) however this code correctly tabify the commented result. kernel-comment-dwim also removes trailing white spaces created by the comment-region. Finally the white space highlighting is a must to alert about long lines, leading or trailing spaces and top or bottom em

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Geyslan G. Bem
hat indentation, but it will mostly make the style consistent and easy as Joe stated. I'm not claiming for that changing, just debating. :-D But IMHO standardization could make things easier. > > Alan Stern > -- Regards, Geyslan G. Bem hackingbits.com -- To unsubscribe from this list

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
2016-01-05 11:10 GMT-03:00 Geyslan G. Bem : > 2016-01-05 10:02 GMT-03:00 Julia Lawall : >>> *** Error in `/usr/lib/coccinelle/spatch': corrupted double-linked >>> list (not small): 0x01c523d0 *** >>> === Backtrace: = >> >> Wow...

Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function

2016-01-05 Thread Geyslan G. Bem
2016-01-05 12:15 GMT-03:00 Alan Stern : > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > >> 2016-01-04 18:01 GMT-03:00 Alan Stern : >> > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: >> > >> >> This patch fixes a coding style issue reported by checkpatch related

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Geyslan G. Bem
2016-01-05 12:27 GMT-03:00 Geyslan G. Bem : > 2016-01-05 12:23 GMT-03:00 Joe Perches : >> On Tue, 2016-01-05 at 10:12 -0500, Alan Stern wrote: >>> On Mon, 4 Jan 2016, Geyslan G. Bem wrote: >>> >>> > >> @@ -404,12 +422,8 @@ static inline char token_mark(

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-05 Thread Geyslan G. Bem
2016-01-05 12:23 GMT-03:00 Joe Perches : > On Tue, 2016-01-05 at 10:12 -0500, Alan Stern wrote: >> On Mon, 4 Jan 2016, Geyslan G. Bem wrote: >> >> > >> @@ -404,12 +422,8 @@ static inline char token_mark(struct ehci_hcd >> > >&

Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

2016-01-05 Thread Geyslan G. Bem
2016-01-04 23:40 GMT-03:00 Joe Perches : > On Mon, 2016-01-04 at 19:07 -0300, Geyslan G. Bem wrote: >> 2016-01-04 18:52 GMT-03:00 Sergei Shtylyov : >> > > > > > This patch fixes coding style issues reported by checkpatch >> > > > > > concer

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
2016-01-05 10:49 GMT-03:00 Andrzej Hajda : > On 01/05/2016 01:59 PM, Geyslan G. Bem wrote: >> Hello, >> >> 2016-01-04 4:45 GMT-03:00 Andrzej Hajda : >>> Unsigned expressions cannot be lesser than zero. Presence of comparisons >>> 'unsigned (<|<=|

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
clude -I >> arch/x86/include/generated/uapi -I arch/x86/include/generated -I >> include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi >> -I ./include/uapi -I include/generated/uapi --include >> ./include/linux/kconfig.h --max 8 --index 7 >> ./drivers/cp

Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero

2016-01-05 Thread Geyslan G. Bem
nerated/uapi --include ./include/linux/kconfig.h --max 8 --index 7 ./drivers/cpufreq/cpufreq-dt.c:87:20-28: WARNING: Unsigned expression compared with zero: volt_old > 0 ./drivers/cpufreq/scpi-cpufreq.c:36:5-11: WARNING: Unsigned expression compared with zero: domain < 0 ./drivers/hsi/cont

Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function

2016-01-04 Thread Geyslan G. Bem
2016-01-04 18:01 GMT-03:00 Alan Stern : > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > >> This patch fixes a coding style issue reported by checkpatch related to >> many leading tabs, removing a 'do while' loop and making use of goto tag >> instead. > >

Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-04 Thread Geyslan G. Bem
2016-01-04 18:00 GMT-03:00 Alan Stern : > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > >> Functions must have the opening brace at the beginning of the next line >> and body conforming indentation. > > This isn't necessary if the function is an empty static inline

Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

2016-01-04 Thread Geyslan G. Bem
f, otherwise your patches will start to very >> quickly be ignored. Good to know. Tks. > > >Just wanted to remind everybody that this option is forced when checking > the networking code... Ditto. > >> thanks, >> >> greg k-h > > > MBR, Sergei >

Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

2016-01-04 Thread Geyslan G. Bem
2016-01-04 17:58 GMT-03:00 Alan Stern : > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > >> This patch fixes coding style issues reported by checkpatch concerning >> to unnecessary space after a cast. > > This is a case where checkpatch is wrong, IMO. Casts should always be &

Re: [PATCH 07/17] usb: host: ehci-dbg: fix unsigned comparison

2016-01-04 Thread Geyslan G. Bem
2016-01-04 17:50 GMT-03:00 Alan Stern : > On Mon, 4 Jan 2016, Geyslan G. Bem wrote: > >> This patch fixes an unsigned comparison to less than 0. > > No, it doesn't. It changes an unsigned comparison for less than or > equal to 0, which is very different from less

[PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch concerning to unnecessary space after a cast. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci

[PATCH 02/17] usb: host: ehci-dbg: remove space before open square bracket

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch. The only change in this patch that isn't just removing spaces before opening square brackets is at line 213 where the initialization of fls_strings[] is placed in same line. Signed-off-by: Geyslan G. Bem --- Notes: Before

[PATCH 03/17] usb: host: ehci-dbg: use C89-style comments

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch. Coding style demands usage of C89-style comments and a specific format when it's multiline. This also removes the Free Software Foundation address because FSF can change it again. Signed-off-by: Geyslan G. Bem --- drivers/usb

[PATCH 06/17] usb: host: ehci-dbg: put spaces around operators

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch concerning to missing spaces around operators. There is an additional change on line 49 that removes unnecessary parenthesis around ternary operands. Signed-off-by: Geyslan G. Bem --- Notes: Tested by compilation only. drivers

[PATCH 07/17] usb: host: ehci-dbg: fix unsigned comparison

2016-01-04 Thread Geyslan G. Bem
This patch fixes an unsigned comparison to less than 0. Signed-off-by: Geyslan G. Bem --- Notes: I'm not sure about that comparison because in qh_lines() temp receives the snprintf() return and thereafter occurs this comparison: if (size < temp) tem

[PATCH 05/17] usb: host: ehci-dbg: fix up closing parenthesis

2016-01-04 Thread Geyslan G. Bem
This patch puts the closing parenthesis at the statement end removing unnecessary "new line". Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/

[PATCH 01/17] usb: host: ehci-dbg: remove space before open parenthesis

2016-01-04 Thread Geyslan G. Bem
n line 50. - On line 55 a call to ehci_dbg reduced to a single line. - sizeof operands surrounded with parenthesis on lines 877, 883, 889 and 901. Signed-off-by: Geyslan G. Bem --- Notes: Before this patch there are 105 warnings about spaces before opening parenthesis. After the

[PATCH 13/17] usb: host: ehci-dbg: remove blank line before close brace

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issue reported by checkpatch concerning to an unnecessary line before close brace. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index

[PATCH 11/17] usb: host: ehci-dbg: convert macro to inline function

2016-01-04 Thread Geyslan G. Bem
36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o After: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o Signed-off-by: Geyslan G. Bem --- Notes: The comment /* functions have the "wrong" filename when they're output...

[PATCH 16/17] usb: host: ehci-dbg: prefer kmalloc_array over kmalloc times size

2016-01-04 Thread Geyslan G. Bem
This patch fixes a coding style issue reported by checkpatch related to kmalloc_array usage. On same line the sizeof operand was enclosed by parenthesis. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 12/17] usb: host: ehci-dbg: add blank line after declarations

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch concerning to missing line after variable declarations. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index

[PATCH 15/17] usb: host: ehci-dbg: enclose conditional blocks with braces

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch concerning to conditional blocks without braces. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host

[PATCH 14/17] usb: host: ehci-dbg: replace sizeof operand

2016-01-04 Thread Geyslan G. Bem
This patch fixes a coding style issue reported by checkpatch concerning to usage of sizeof operand as a variable instead the type. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-dbg.c b

[PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function

2016-01-04 Thread Geyslan G. Bem
ht on line 770. Signed-off-by: Geyslan G. Bem --- Notes: Tested by compilation only. drivers/usb/host/ehci-dbg.c | 180 ++-- 1 file changed, 88 insertions(+), 92 deletions(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c ind

[PATCH 10/17] usb: host: ehci-dbg: use a blank line after struct declarations

2016-01-04 Thread Geyslan G. Bem
This patch fixes coding style issues reported by checkpatch concerning to missing line after struct declarations. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index

[PATCH 09/17] usb: host: ehci-dbg: fix up function definitions

2016-01-04 Thread Geyslan G. Bem
Functions must have the opening brace at the beginning of the next line and body conforming indentation. This patch also reduces qh_lines() header definition to two lines. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/ehci-dbg.c | 44 +--- 1 file

[PATCH 00/17] usb: host: ehci-dbg: cleanup and refactoring

2016-01-04 Thread Geyslan G. Bem
This patchset removes all errors reported by checkpatch in addition to some refactoring. Geyslan G. Bem (17): usb: host: ehci-dbg: remove space before open parenthesis usb: host: ehci-dbg: remove space before open square bracket usb: host: ehci-dbg: use C89-style comments usb: host: ehci

[PATCH 04/17] usb: host: ehci-dbg: move trailing statements to next line

2016-01-04 Thread Geyslan G. Bem
parameters. - On line 723 the constant "0x03" is moved to right. Signed-off-by: Geyslan G. Bem --- Notes: Before this patch there are 14 warnings about trailing statements that should be on next line. After there are still 4. These lines concern to a macro that will be modifie

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-30 Thread Geyslan G. Bem
2015-12-16 8:21 GMT-03:00 Geyslan G. Bem : > 2015-12-15 21:13 GMT-03:00 Joe Perches : >> On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote: >>> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem : >>> > Suggested-by: Peter Senna Tschudin >>> > Reported-by:

[PATCH] checkpatch: fix left brace warning

2015-12-30 Thread Geyslan G. Bem
start of a construct. This catches it in the middle of a literal string, or when it's the first thing after something like "\b"." This works as a complement to 4e5d56bd. Signed-off-by: Geyslan G. Bem Suggested-by: Peter Senna Tschudin --- scripts/checkpatch.pl | 2 +- 1 file chan

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

2015-12-24 Thread Geyslan G. Bem
2015-12-24 13:27 GMT-03:00 Greg Kroah-Hartman : > On Thu, Dec 24, 2015 at 01:01:36PM -0300, Geyslan G. Bem wrote: >> >> 2015-12-11 18:24 GMT-03:00 Geyslan G. Bem : >> >> This cleanup was done with the help of checkpatch and coccinelle tools. >> >>

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

2015-12-24 Thread Geyslan G. Bem
2015-12-13 13:59 GMT-03:00 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-

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-16 Thread Geyslan G. Bem
2015-12-15 21:13 GMT-03:00 Joe Perches : > On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote: >> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem : >> > Suggested-by: Peter Senna Tschudin >> > Reported-by: Geyslan G. Bem >> > >> >> Joe, do you appl

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-15 Thread Geyslan G. Bem
2015-12-10 8:24 GMT-03:00 Geyslan G. Bem : > 2015-12-09 19:59 GMT-03:00 Geyslan G. Bem : >> >> >> 2015-12-07 20:36 GMT-03:00 Geyslan G. Bem : >>> >>> 2015-12-07 20:06 GMT-03:00 Joe Perches : >>> > On Mon, 2015-12-07 at 19:53 -0300, Ge

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

2015-12-13 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 v3 03/10] usb: host: ehci-sched: remove useless initializations

2015-12-13 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 v3 06/10] usb: host: ehci-sched: remove useless else branch

2015-12-13 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 v3 04/10] usb: host: ehci-sched: add spaces around operators

2015-12-13 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 v3 05/10] usb: host: ehci-sched: remove prohibited spaces

2015-12-13 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 v3 10/10] usb: host: ehci-sched: remove unnecessary braces

2015-12-13 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 v3 07/10] usb: host: ehci-sched: use C89-style comments

2015-12-13 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 v3 08/10] usb: host: ehci-sched: add line after declarations

2015-12-13 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 2705c0b..d62d2fe 100644 --- a/drivers

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

2015-12-13 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 v3 01/10] usb: host: ehci-sched: refactor scan_isoc function

2015-12-13 Thread Geyslan G. Bem
tabs - consider code refactoring Signed-off-by: Geyslan G. Bem --- v2: Fixes file coding indentation. Puts 'live' variable as the first evaluation in two ifs. v3: Undo the conditional reordering since it's most likely. --- drivers/usb/host/ehci-sched.c | 202 ++

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

2015-12-13 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

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

2015-12-13 Thread Geyslan G. Bem
2015-12-13 12:29 GMT-03:00 Alan Stern : > On Sun, 13 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. >> >> It also puts the ea

[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 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 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 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 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 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 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 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 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

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

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 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 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] 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

[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: [BUG] checkpatch warning default switch case

2015-12-11 Thread Geyslan G. Bem
2015-12-11 22:34 GMT-03:00 Joe Perches : > On Fri, 2015-12-11 at 18:56 -0300, Geyslan G. Bem wrote: >> 2015-12-11 17:21 GMT-03:00 Geyslan G. Bem : >> > 2015-12-11 17:08 GMT-03:00 Joe Perches : >> > > On Fri, 2015-12-11 at 16:34 -0300, Geyslan G. Bem wrote: >> &g

[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 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 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 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 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 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 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 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 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 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

Re: [BUG] checkpatch warning default switch case

2015-12-11 Thread Geyslan G. Bem
2015-12-11 17:21 GMT-03:00 Geyslan G. Bem : > 2015-12-11 17:08 GMT-03:00 Joe Perches : >> On Fri, 2015-12-11 at 16:34 -0300, Geyslan G. Bem wrote: >>> Hello, >>> >>> Running >>> scripts/checkpatch.pl -f drivers/usb/host/ehci-sched.c >>> >>

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 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 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 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 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 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 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/

  1   2   3   >