<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/checkpatch.pl, branch v3.15-rc6</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: don't warn on bitfield spaces around :</title>
<updated>2014-04-03T23:21:16+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-04-03T21:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b00e48148e99a20c3d81346390d60c7d23826f61'/>
<id>b00e48148e99a20c3d81346390d60c7d23826f61</id>
<content type='text'>
This test prevents code from being aligned around the : for easy visual
counting of bitfield lengths.

ie:
	int foo		: 1,
	int bar		: 2,
	int foobar	:29;

should be acceptable so remove the test.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Dan Carpenter &lt;dan.carpenter@oracle.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>
This test prevents code from being aligned around the : for easy visual
counting of bitfield lengths.

ie:
	int foo		: 1,
	int bar		: 2,
	int foobar	:29;

should be acceptable so remove the test.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Dan Carpenter &lt;dan.carpenter@oracle.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: expand parenthesis alignment test to declarations, functions and assignments</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-04-03T21:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=91cb5195ff224dd9044cf927f80d9c633cdcffec'/>
<id>91cb5195ff224dd9044cf927f80d9c633cdcffec</id>
<content type='text'>
Currently the parenthesis alignment test works only on misalignments of
if statements like

	if (foo(bar,
			baz)

Expand the test to find misalignments like:

static inline int foo(int bar,
			int baz)

and

	foo(bar,
			baz);

and

	foo = bar(baz,
			qux);

Expand the $Inline keyword for __inline and __inline__ too.
Add $Inline to $Declare so it also matches "static inline &lt;foo&gt;".

These checks are only performed with --strict.

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>
Currently the parenthesis alignment test works only on misalignments of
if statements like

	if (foo(bar,
			baz)

Expand the test to find misalignments like:

static inline int foo(int bar,
			int baz)

and

	foo(bar,
			baz);

and

	foo = bar(baz,
			qux);

Expand the $Inline keyword for __inline and __inline__ too.
Add $Inline to $Declare so it also matches "static inline &lt;foo&gt;".

These checks are only performed with --strict.

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>
<entry>
<title>checkpatch.pl: add check for Change-Id</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Christopher Covington</name>
<email>cov@codeaurora.org</email>
</author>
<published>2014-04-03T21:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7ebd05ef1646e8cbef54e38343722741a4744626'/>
<id>7ebd05ef1646e8cbef54e38343722741a4744626</id>
<content type='text'>
A commit hook for the Gerrit code review server [1] inserts change
identifiers so Gerrit can track patches through multiple revisions.
These identifiers are noise in the context of the upstream kernel.
(Many Gerrit servers are private.  Even given a public instance, given
only a Change-Id, one must guess which server a change was tracked on.
Patches submitted to the Linux kernel mailing lists should be able to
stand on their own.  If it's truly useful to reference code review on a
Gerrit server, a URL is a much clearer way to do so.) Thus, issue an
error when a Change-Id line is encountered before the Signed-off-by.

1. https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks/commit-msg

Signed-off-by: Christopher Covington &lt;cov@codeaurora.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.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>
A commit hook for the Gerrit code review server [1] inserts change
identifiers so Gerrit can track patches through multiple revisions.
These identifiers are noise in the context of the upstream kernel.
(Many Gerrit servers are private.  Even given a public instance, given
only a Change-Id, one must guess which server a change was tracked on.
Patches submitted to the Linux kernel mailing lists should be able to
stand on their own.  If it's truly useful to reference code review on a
Gerrit server, a URL is a much clearer way to do so.) Thus, issue an
error when a Change-Id line is encountered before the Signed-off-by.

1. https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks/commit-msg

Signed-off-by: Christopher Covington &lt;cov@codeaurora.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.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>scripts/checkpatch.pl: __GFP_NOFAIL isn't going away</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2014-04-03T21:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74915c7dd0e144cc735058a77a3901c98f1e7039'/>
<id>74915c7dd0e144cc735058a77a3901c98f1e7039</id>
<content type='text'>
Revert commit 7e4915e78992 ("checkpatch: add warning of future
__GFP_NOFAIL use").

There are no plans to remove __GFP_NOFAIL.

__GFP_NOFAIL exists to

a) centralise the retry-allocation-for-ever operation into the core
   allocator, which is the appropriate implementation site and

b) permit us to identify code sites which aren't handling memory
   exhaustion appropriately.

Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&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>
Revert commit 7e4915e78992 ("checkpatch: add warning of future
__GFP_NOFAIL use").

There are no plans to remove __GFP_NOFAIL.

__GFP_NOFAIL exists to

a) centralise the retry-allocation-for-ever operation into the core
   allocator, which is the appropriate implementation site and

b) permit us to identify code sites which aren't handling memory
   exhaustion appropriately.

Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&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: net and drivers/net: warn on missing blank line after variable declaration</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-04-03T21:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3b617e3b80548096eda92ebd8382f76b139e011c'/>
<id>3b617e3b80548096eda92ebd8382f76b139e011c</id>
<content type='text'>
Networking prefers this style, so warn when it's not used.

Networking uses:

    void foo(int bar)
    {
        int baz;

        code...
   }

not

    void foo(int bar)
    {
        int baz;
        code...
    }

There are a limited number of false positives when using macros to
declare variables like:

  WARNING: networking uses a blank line after declarations
  #330: FILE: net/ipv4/inet_hashtables.c:330:
  +	int dif = sk-&gt;sk_bound_dev_if;
  +	INET_ADDR_COOKIE(acookie, saddr, daddr)

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: David Miller &lt;davem@davemloft.net&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>
Networking prefers this style, so warn when it's not used.

Networking uses:

    void foo(int bar)
    {
        int baz;

        code...
   }

not

    void foo(int bar)
    {
        int baz;
        code...
    }

There are a limited number of false positives when using macros to
declare variables like:

  WARNING: networking uses a blank line after declarations
  #330: FILE: net/ipv4/inet_hashtables.c:330:
  +	int dif = sk-&gt;sk_bound_dev_if;
  +	INET_ADDR_COOKIE(acookie, saddr, daddr)

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: David Miller &lt;davem@davemloft.net&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: improve the compatible vendor match</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Florian Vaussard</name>
<email>florian.vaussard@epfl.ch</email>
</author>
<published>2014-04-03T21:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc93319b5f2471ff2042ce62ea6da1f3bb3ce394'/>
<id>cc93319b5f2471ff2042ce62ea6da1f3bb3ce394</id>
<content type='text'>
Improve the vendor name match in vendor-prefix.txt by only matching the
exact vendor name at the beginning of lines.

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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>
Improve the vendor name match in vendor-prefix.txt by only matching the
exact vendor name at the beginning of lines.

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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: check compatible strings in .c and .h too</title>
<updated>2014-04-03T23:21:15+00:00</updated>
<author>
<name>Florian Vaussard</name>
<email>florian.vaussard@epfl.ch</email>
</author>
<published>2014-04-03T21:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dd05b38e5b729f412b617baad5c3363519cf1d4'/>
<id>7dd05b38e5b729f412b617baad5c3363519cf1d4</id>
<content type='text'>
Look for ".compatible = "foo" strings not only in .dts files, but
in .c and .h too.

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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>
Look for ".compatible = "foo" strings not only in .dts files, but
in .c and .h too.

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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: fix spurious vendor compatible warnings</title>
<updated>2014-04-03T23:21:14+00:00</updated>
<author>
<name>Florian Vaussard</name>
<email>florian.vaussard@epfl.ch</email>
</author>
<published>2014-04-03T21:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4fbf32a69346afc87ac1ddceb92c860d644433f9'/>
<id>4fbf32a69346afc87ac1ddceb92c860d644433f9</id>
<content type='text'>
With a compatible string like

  compatible = "foo";

checkpatch will currently try to find "foo" in vendor-prefixes.txt,
which is wrong since the vendor prefix is empty in this specific case.

Skip the vendor test if the compatible is not like

  compatible = "vendor,something";

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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>
With a compatible string like

  compatible = "foo";

checkpatch will currently try to find "foo" in vendor-prefixes.txt,
which is wrong since the vendor prefix is empty in this specific case.

Skip the vendor test if the compatible is not like

  compatible = "vendor,something";

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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: check vendor compatible with dashes</title>
<updated>2014-04-03T23:21:14+00:00</updated>
<author>
<name>Florian Vaussard</name>
<email>florian.vaussard@epfl.ch</email>
</author>
<published>2014-04-03T21:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f0dbfaf2715b80f491c3e23c318c4202abf89e2'/>
<id>8f0dbfaf2715b80f491c3e23c318c4202abf89e2</id>
<content type='text'>
The current vendor compatible check will not match vendors with dashes,
like:

  compatible="asahi-kasei"

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Reported-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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>
The current vendor compatible check will not match vendors with dashes,
like:

  compatible="asahi-kasei"

Signed-off-by: Florian Vaussard &lt;florian.vaussard@epfl.ch&gt;
Reported-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.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: improve octal permissions test speed</title>
<updated>2014-04-03T23:21:14+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-04-03T21:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=515a235ef9bcd31faa672740720936b22fa99c0e'/>
<id>515a235ef9bcd31faa672740720936b22fa99c0e</id>
<content type='text'>
The current octal permissions test is very slow.

When patch ("checkpatch: add checks for constant non-octal permissions")
was added, processing time approximately tripled.

Regain almost all of the performance by not looping through all the
possible functions unless the line contains one of the functions.

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>
The current octal permissions test is very slow.

When patch ("checkpatch: add checks for constant non-octal permissions")
was added, processing time approximately tripled.

Regain almost all of the performance by not looping through all the
possible functions unless the line contains one of the functions.

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>
