<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/checkpatch.pl, branch v3.18.84</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.84</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.84'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-21T06:12:22Z</updated>
<entry>
<title>checkpatch: silence perl 5.26.0 unescaped left brace warnings</title>
<updated>2017-07-21T06:12:22Z</updated>
<author>
<name>Cyril Bur</name>
<email>cyrilbur@gmail.com</email>
</author>
<published>2017-07-10T22:52:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9034de1dc17fc062b42f30b762e18cd94eb68fa4'/>
<id>urn:sha1:9034de1dc17fc062b42f30b762e18cd94eb68fa4</id>
<content type='text'>
commit 8d81ae05d0176da1c54aeaed697fa34be5c5575e upstream.

As of perl 5, version 26, subversion 0 (v5.26.0) some new warnings have
occurred when running checkpatch.

Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by &lt;-- HERE in m/^(.\s*){
&lt;-- HERE \s*/ at scripts/checkpatch.pl line 3544.

Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by &lt;-- HERE in m/^(.\s*){
&lt;-- HERE \s*/ at scripts/checkpatch.pl line 3885.

Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by &lt;-- HERE in
m/^(\+.*(?:do|\))){ &lt;-- HERE / at scripts/checkpatch.pl line 4374.

It seems perfectly reasonable to do as the warning suggests and simply
escape the left brace in these three locations.

Link: http://lkml.kernel.org/r/20170607060135.17384-1-cyrilbur@gmail.com
Signed-off-by: Cyril Bur &lt;cyrilbur@gmail.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>checkpatch: warn on logging functions with KERN_&lt;LEVEL&gt;</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-10-13T22:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f78d98f6ce66fc7cc0be714d56b0240923a8b4f4'/>
<id>urn:sha1:f78d98f6ce66fc7cc0be714d56b0240923a8b4f4</id>
<content type='text'>
Warn on probable misuses of logging functions with KERN_&lt;LEVEL&gt;
like pr_err(KERN_ERR "foo\n");

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.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: add exception to return then else test</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-10-13T22:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=840080a08492bd2bb3314077b672b59c88bbe0e6'/>
<id>urn:sha1:840080a08492bd2bb3314077b672b59c88bbe0e6</id>
<content type='text'>
Add an exception to the return before else warning when the line
following it is also a return like:

	if (foo)
		return bar;
	else
		return baz;

This form of a test then return is at least as readable as

	if (foo)
		return bar;
	return baz;

so don't emit a warning on the first form.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Elshad Mustafayev &lt;elshadimo@gmail.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: look for common misspellings</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2014-10-13T22:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=66b47b4a9dad00e45c049d79966de9a3a1f4d337'/>
<id>urn:sha1:66b47b4a9dad00e45c049d79966de9a3a1f4d337</id>
<content type='text'>
Check for misspellings, based on Debian's lintian list.  Several false
positives were removed, and several additional words added that were
common in the kernel:

	backword backwords
	invalide valide
	recieves
	singed unsinged

While going back and fixing existing spelling mistakes isn't a high
priority, it'd be nice to try to catch them before they hit the tree.

In the 13830 commits between 3.15 and 3.16, the script would have noticed
560 spelling mistakes. The top 25 are shown here:

$ git log --pretty=oneline v3.15..v3.16 | wc -l
13830
$ git log --format='%H' v3.15..v3.16 | \
   while read commit ; do \
     echo "commit $commit" ; \
     git log --format=email --stat -p -1 $commit | \
       ./scripts/checkpatch.pl --types=typo_spelling --no-summary - ; \
   done | tee spell_v3.15..v3.16.txt | grep "may be misspelled" | \
   awk '{print $2}' | tr A-Z a-z | sort | uniq -c | sort -rn
     21 'seperate'
     17 'endianess'
     15 'sucess'
     13 'noticable'
     11 'occured'
     11 'accomodate'
     10 'interrup'
      9 'prefered'
      8 'unecessary'
      8 'explicitely'
      7 'supress'
      7 'overriden'
      7 'immediatly'
      7 'funtion'
      7 'defult'
      7 'childs'
      6 'succesful'
      6 'splitted'
      6 'specifc'
      6 'reseting'
      6 'recieve'
      6 'changable'
      5 'tmis'
      5 'singed'
      5 'preceeding'

Thanks to Joe Perches for rewrites, suggestions, additional misspelling
entries, and testing.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Masanari Iida &lt;standby24x7@gmail.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: warn on macros with flow control statements</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-10-13T22:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=08a2843e77fc581d204c1e83de4678b746cdbd6e'/>
<id>urn:sha1:08a2843e77fc581d204c1e83de4678b746cdbd6e</id>
<content type='text'>
Macros with flow control statements (goto and return) are not very nice to
read as any flow movement is unexpected.

Try to highlight them and emit a warning on their definition.

Avoid warning on macros that use argument concatenation as those macros
commonly create another function where the concatenation is used in the
function name definition like:

	#define FOO_FUNC(name, rtn_type)	\
	rtn_type func##name(arg1, ...)		\
	{					\
		rtn_type rtn;			\
		[code...]			\
		return rtn;			\
	}

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: remove unnecessary + after {8,8}</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-10-13T22:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d2207ccbc59900311c88bb9150b24253cd4ddd49'/>
<id>urn:sha1:d2207ccbc59900311c88bb9150b24253cd4ddd49</id>
<content type='text'>
There's a useless "+" use that needs to be removed as perl 5.20 emits a
"Useless use of greediness modifier '+'" message each time it's hit.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Greg KH &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: add --strict test for concatenated string elements</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-10-13T22:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f17dba4fc0496eb0daf018074fccebdc85993c75'/>
<id>urn:sha1:f17dba4fc0496eb0daf018074fccebdc85993c75</id>
<content type='text'>
Using a space between concatenated string elements is easier for a human
to read.

ie:
	"String"FOO"bar"

is easier to read as:

	"String" FOO "bar"

So suggest this style with a --strict command line option.

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: allow optional shorter config descriptions</title>
<updated>2014-10-14T00:18:15Z</updated>
<author>
<name>Vadim Bendebury</name>
<email>vbendeb@chromium.org</email>
</author>
<published>2014-10-13T22:51:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56193274ef54265afc93fd282655836595fcff9d'/>
<id>urn:sha1:56193274ef54265afc93fd282655836595fcff9d</id>
<content type='text'>
This script is used by many other projects, and in some of them the
requirement of at least 4 line long description for all Kconfig items is
excessive.  This patch adds a command line option to control the required
minimum length.

Tested running this script over a patch including a two line config
description.  The script generated a warning when invoked as is, and did
not generate it when invoked with --min-conf-desc-length=2.

Signed-off-by: Vadim Bendebury &lt;vbendeb@chromium.org&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>
</entry>
<entry>
<title>checkpatch: enable whitespace checks for DTS files</title>
<updated>2014-10-14T00:18:14Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-10-13T22:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de4c924c265049e576036d1ee6fc9dfefeb5ae87'/>
<id>urn:sha1:de4c924c265049e576036d1ee6fc9dfefeb5ae87</id>
<content type='text'>
When run on *.dtsi or *.dts files, the whitespace checks were skipped,
while they are valid for DTS files.  Hence stop skipping them.

I ran checkpatch on all in-tree DTS files, and didn't notice any error or
warning messages that are inappropriate for DTS files.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&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>
</entry>
<entry>
<title>checkpatch: update $allowed_asm_includes macros, add reboot.h and time.h</title>
<updated>2014-10-14T00:18:14Z</updated>
<author>
<name>Sergey Ryazanov</name>
<email>ryazanov.s.a@gmail.com</email>
</author>
<published>2014-10-13T22:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdcee686ee9047185b7a484614f6c2faa5c4a7bb'/>
<id>urn:sha1:cdcee686ee9047185b7a484614f6c2faa5c4a7bb</id>
<content type='text'>
Several architectures (e.g.  x86, MIPS, Blackfin) have asm/reboot.h and
asm/time.h header files, which are not included in linux/reboot.h and
linux/time.h headers.  This lead to generation of false positive errors.

Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&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>
</feed>
