<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/checkpatch.pl, branch v4.4.29</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.29</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.29'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-11-07T01:50:42Z</updated>
<entry>
<title>checkpatch: improve the unnecessary initialisers tests</title>
<updated>2015-11-07T01:50:42Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-11-07T00:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d32f7a391466ed89d8a1018fdff5330766cc272'/>
<id>urn:sha1:6d32f7a391466ed89d8a1018fdff5330766cc272</id>
<content type='text'>
Global and static variables don't need to be initialized to 0.

There is already a test for this but the output message doesn't
mention booleans initialized to false.

Improve the output message and the test by adding various forms
with possible specific integer types and possible multiple zeros.

Miscellanea:

o Use a variable to hold the possible 0 test

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Shailendra Verma &lt;shailendra.v@samsung.com&gt;
Tested-by: Shailendra Verma &lt;shailendra.v@samsung.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>
</entry>
<entry>
<title>checkpatch: improve tests for fixes:, long lines and stack dumps in commit log</title>
<updated>2015-11-07T01:50:42Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-11-07T00:31:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=369c8dd390baffd77b892b563d03f800e65d2dfa'/>
<id>urn:sha1:369c8dd390baffd77b892b563d03f800e65d2dfa</id>
<content type='text'>
Including BUG and stack dumps in commit logs makes checkpatch produce some
false positive warning messages.

checkpatch has multiple types of false positives:

o Commit message lines &gt; 75 chars
o Stack dump address are mistaken for git commit IDs
o Link: and Fixes: lines are allowed to be &gt; 75 chars.
o Fixes: style doesn't require ("&lt;commit_description&gt;")
  parentheses and double quotes like other uses of
  git commit ID and description.

Fix these.

Miscellanea:

o Move the test for checking $commit_log_possible_stack_dump
  above the test for a long line commit message
o Add test for hex address surrounded by square or angle brackets

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add constant comparison on left side test</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5595fa2f1ce3c1a74dbd2ddc949257e80d81dc0'/>
<id>urn:sha1:c5595fa2f1ce3c1a74dbd2ddc949257e80d81dc0</id>
<content type='text'>
"CONST &lt;comparison&gt; variable" checks like:

        if (NULL != foo)
and
        while (0 &lt; bar(...))

where a constant (or what appears to be a constant like an upper case
identifier) is on the left of a comparison are generally preferred to be
written using the constant on the right side like:

        if (foo != NULL)
and
        while (bar(...) &gt; 0)

Add a test for this.

Add a --fix option too, but only do it when the code is immediately
surrounded by parentheses to avoid misfixing things like "(0 &lt; bar() +
constant)"

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Nicolas Morey Chaisemartin &lt;nmorey@kalray.eu&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: 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>
</entry>
<entry>
<title>checkpatch: add __pmem to $Sparse annotations</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=54507b5183cc4f8e4f1a58a312e1f30c130658b7'/>
<id>urn:sha1:54507b5183cc4f8e4f1a58a312e1f30c130658b7</id>
<content type='text'>
commit 61031952f4c8 ("arch, x86: pmem api for ensuring durability of
persistent memory updates") added a new __pmem annotation for sparse
verification.  Add __pmem to the $Sparse variable so checkpatch can
appropriately ignore uses of this attribute too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reviewed-by: Ross Zwisler &lt;ross.zwisler@linux.intel.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>
</entry>
<entry>
<title>checkpatch: fix left brace warning</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Eddie Kovsky</name>
<email>ewk@edkovsky.org</email>
</author>
<published>2015-09-09T22:37:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a'/>
<id>urn:sha1:4e5d56bdf892e18832a6540b63ebf709966bce2a</id>
<content type='text'>
Using checkpatch.pl with Perl 5.22.0 generates the following warning:

    Unescaped left brace in regex is deprecated, passed through in regex;

This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.

Signed-off-by: Eddie Kovsky &lt;ewk@edkovsky.org&gt;
Cc: 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>
</entry>
<entry>
<title>checkpatch: avoid some commit message long line warnings</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bf4daf12a9fbc818029051c97b65fbfca6366a44'/>
<id>urn:sha1:bf4daf12a9fbc818029051c97b65fbfca6366a44</id>
<content type='text'>
Fixes: and Link: lines may exceed 75 chars in the commit log.

So too can stack dump and dmesg lines and lines that seem
like filenames.

And Fixes: lines don't need to have a "commit" prefix before the
commit id.

Add exceptions for these types of lines.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: emit an error on formats with 0x%&lt;decimal&gt;</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e30075742316a1d72b7e8f794f6e0bd44d774e2'/>
<id>urn:sha1:6e30075742316a1d72b7e8f794f6e0bd44d774e2</id>
<content type='text'>
Using 0x%d is wrong.  Emit a message when it happens.

Miscellanea:

Improve the %Lu warning to match formats like %16Lu.

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>
</entry>
<entry>
<title>checkpatch: make --strict the default for drivers/staging files and patches</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7bd7e483c27d884c2f59e286e42623abba413f83'/>
<id>urn:sha1:7bd7e483c27d884c2f59e286e42623abba413f83</id>
<content type='text'>
Making --strict the default for staging may help some people submit
patches without obvious defects.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.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>
</entry>
<entry>
<title>checkpatch: always check block comment styles</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=86406b1cb7ac4fa5e7691eae5f2fb10c9af03dc3'/>
<id>urn:sha1:86406b1cb7ac4fa5e7691eae5f2fb10c9af03dc3</id>
<content type='text'>
Some of the block comment tests that are used only for networking are
appropriate for all patches.

For example, these styles are not encouraged:

	/*
	 block comment without introductory *
	*/
and
	/*
	 * block comment with line terminating */

Remove the networking specific test and add comments.

There are some infrequent false positives where code is lazily
commented out using /* and */ rather than using #if 0/#endif blocks
like:
	/* case foo:
	case bar: */
	case baz:

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>
</entry>
<entry>
<title>checkpatch: report the right line # when using --emacs and --file</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-09T22:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7d3a9f673e1bdb45f86d15a67e230e4a9b050850'/>
<id>urn:sha1:7d3a9f673e1bdb45f86d15a67e230e4a9b050850</id>
<content type='text'>
commit 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe
to show filenames") broke the --emacs with --file option.

Fix it.

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