<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/checkpatch.pl, branch v3.17-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>checkpatch: relax check for length of git commit IDs</title>
<updated>2014-08-29T23:28:15+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-29T22:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f6316b4378e64e96acfe55b499648dc0e6b9603'/>
<id>3f6316b4378e64e96acfe55b499648dc0e6b9603</id>
<content type='text'>
Checkpatch currently warns if a git commit ID (in the changelog,
usually) is less than 12 characters or more than 16.  The "more than 16"
is excessive.  Change the check so we accept IDs from 12 to 40 chars in
length.

Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checkpatch currently warns if a git commit ID (in the changelog,
usually) is less than 12 characters or more than 16.  The "more than 16"
is excessive.  Change the check so we accept IDs from 12 to 40 chars in
length.

Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: update $declaration_macros, add uninitialized_var</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f84223087402c45179be5e7060c5736c17a7b271'/>
<id>f84223087402c45179be5e7060c5736c17a7b271</id>
<content type='text'>
Using uninitialized_var reports a false positive for "Missing blank line
after declarations".

Fix it by adding uninitialized_var to the $declaration_macros exceptions
list.

Move the macro list after $Type is declared.

Add optional prefixes to DECLARE_&lt;FOO&gt; and DEFINE_&lt;BAR&gt;
macro declarations to allow forms like:
	MLX4_DECLARE_DOORBELL_LOCK

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Dotan Barak &lt;dotanb@mellanox.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using uninitialized_var reports a false positive for "Missing blank line
after declarations".

Fix it by adding uninitialized_var to the $declaration_macros exceptions
list.

Move the macro list after $Type is declared.

Add optional prefixes to DECLARE_&lt;FOO&gt; and DEFINE_&lt;BAR&gt;
macro declarations to allow forms like:
	MLX4_DECLARE_DOORBELL_LOCK

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Dotan Barak &lt;dotanb@mellanox.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: warn on missing spaces in broken up quoted</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-08-06T23:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ece9659f16e369d344fe4325d87fab3bb50d1fe2'/>
<id>ece9659f16e369d344fe4325d87fab3bb50d1fe2</id>
<content type='text'>
Checkpatch already complains when people break up quoted strings but
it's still pretty common.  One mistake that people often make is they
leave out the space character between the two strings.

This check adds around 450 new warnings and has a low rate of false
positives.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checkpatch already complains when people break up quoted strings but
it's still pretty common.  One mistake that people often make is they
leave out the space character between the two strings.

This check adds around 450 new warnings and has a low rate of false
positives.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: fix false positives for --strict "space after cast" test</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=308cc8d8f0deab2c5a5162316277ced556acc71f'/>
<id>308cc8d8f0deab2c5a5162316277ced556acc71f</id>
<content type='text'>
Commit 89da401f6cff ("checkpatch: improve "no space after cast" test")
in -next improved the cast test for non pointer types, but also
introduced false positives for some types of static inlines.

Add a test for an open brace to the exclusions to avoid these false
positives.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Hartley Sweeten &lt;HartleyS@visionengravers.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 89da401f6cff ("checkpatch: improve "no space after cast" test")
in -next improved the cast test for non pointer types, but also
introduced false positives for some types of static inlines.

Add a test for an open brace to the exclusions to avoid these false
positives.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Hartley Sweeten &lt;HartleyS@visionengravers.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: fix false positive MISSING_BREAK warnings with --file</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e81f239b4db2ad6c4b029ed92f0222601ce42abe'/>
<id>e81f239b4db2ad6c4b029ed92f0222601ce42abe</id>
<content type='text'>
Using --file mode can give false positives with MISSING_BREAK
fall-through warnings on simple but long multiple consecutive case
statements.

Look for all lines before a case statement for a switch or a statement
when using --file mode.

Fix a misspelling of preceded while there.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using --file mode can give false positives with MISSING_BREAK
fall-through warnings on simple but long multiple consecutive case
statements.

Look for all lines before a case statement for a switch or a statement
when using --file mode.

Fix a misspelling of preceded while there.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: add test for native c90 types in unusual order</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1813087dbc54ff1485bcc84b66d34052eaf23387'/>
<id>1813087dbc54ff1485bcc84b66d34052eaf23387</id>
<content type='text'>
c90 section "6.7.2 Type Specifiers" says:
    "type specifiers may occur in any order"

That means that:
    short int is the same as int short
    unsigned short int is the same as int unsigned short
    etc...

checkpatch currently parses only a subset of these allowed types.

For instance: "unsigned short" and "signed short" are found by
checkpatch as a specific type, but none of the or "int short" or "int
signed short" variants are found.

Add another table for the "kernel style misordered" variants.

Add this misordered table to the findable types.

Warn when the misordered style is used.

This improves the "Missing a blank line after declarations" test as it
depends on the correct parsing of the $Declare variable which looks for
"$Type $Ident;" (ie: declarations like "int foo;").

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
c90 section "6.7.2 Type Specifiers" says:
    "type specifiers may occur in any order"

That means that:
    short int is the same as int short
    unsigned short int is the same as int unsigned short
    etc...

checkpatch currently parses only a subset of these allowed types.

For instance: "unsigned short" and "signed short" are found by
checkpatch as a specific type, but none of the or "int short" or "int
signed short" variants are found.

Add another table for the "kernel style misordered" variants.

Add this misordered table to the findable types.

Warn when the misordered style is used.

This improves the "Missing a blank line after declarations" test as it
depends on the correct parsing of the $Declare variable which looks for
"$Type $Ident;" (ie: declarations like "int foo;").

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: add signed generic types</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0c773d9d66684aefd919c4b4550fe16003c54c0e'/>
<id>0c773d9d66684aefd919c4b4550fe16003c54c0e</id>
<content type='text'>
Current generic types are unsigned or unspecified.  Add signed to the
types.

Reorder the types to find the longest match first.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current generic types are unsigned or unspecified.  Add signed to the
types.

Reorder the types to find the longest match first.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: add short int to c variable types</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f7bc4e1fcfab05f3e8b49134cfb3e16b8876aae'/>
<id>3f7bc4e1fcfab05f3e8b49134cfb3e16b8876aae</id>
<content type='text'>
short int is one of the 6.7.2 c90 types.
Find it appropriately.

This fixes a defect in checkpatch where it suggests that a line break
after declaration is required using an input like:

	int foo;
	short int bar;

Without this change, it warns on the short int line.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Hartley Sweeten &lt;HartleyS@visionengravers.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
short int is one of the 6.7.2 c90 types.
Find it appropriately.

This fixes a defect in checkpatch where it suggests that a line break
after declaration is required using an input like:

	int foo;
	short int bar;

Without this change, it warns on the short int line.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Hartley Sweeten &lt;HartleyS@visionengravers.com&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: add for_each tests to indentation and brace tests</title>
<updated>2014-08-07T01:01:29+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0fe3dc2bc554b849c27c0ebc36daedf032514200'/>
<id>0fe3dc2bc554b849c27c0ebc36daedf032514200</id>
<content type='text'>
All the various for_each loop macros were not tested for trailing brace
on the following lines and for bad indentation.

Add them.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All the various for_each loop macros were not tested for trailing brace
on the following lines and for bad indentation.

Add them.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: fix brace style misuses of else and while</title>
<updated>2014-08-07T01:01:28+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-06T23:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b8856f4b102ce148611322465f2ff8932664411'/>
<id>8b8856f4b102ce148611322465f2ff8932664411</id>
<content type='text'>
Add --fix corrections for ELSE_AFTER_BRACE and WHILE_AFTER_BRACE
misuses.

	if (x) {
		...
	}
	else {
		...
	}

is corrected to

	if (x) {
		...
	} else {
		...
	}

and

	do {
		...
	}
	while (x);

is corrected to

	do {
		...
	} while (x);

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add --fix corrections for ELSE_AFTER_BRACE and WHILE_AFTER_BRACE
misuses.

	if (x) {
		...
	}
	else {
		...
	}

is corrected to

	if (x) {
		...
	} else {
		...
	}

and

	do {
		...
	}
	while (x);

is corrected to

	do {
		...
	} while (x);

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
