<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/checkpatch.pl, branch v3.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-07-09T17:33:25Z</updated>
<entry>
<title>checkpatch: make the CamelCase cache work for non-git trees too</title>
<updated>2013-07-09T17:33:25Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-08T23:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c707a81de71a27a499fde60fbb963f60602c1a94'/>
<id>urn:sha1:c707a81de71a27a499fde60fbb963f60602c1a94</id>
<content type='text'>
Might as well check include timestamps and cache the include file
CamelCase uses for the non-git case too.

The camelcase cache file is now named:

  for git:      .checkpatch-camelcase.git.&lt;commit_id&gt;
  for non-git:  .checkpatch-camelcase.date.&lt;YYYYMMDDhhmm&gt;

All .checkpatch-camelcase* files are deleted if not current.

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: cache last camelcase hash as .checkpatch-camelcase.&lt;commit&gt;</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=351b2a1fe2d06f44b4c06d377744b2ac408b7407'/>
<id>urn:sha1:351b2a1fe2d06f44b4c06d377744b2ac408b7407</id>
<content type='text'>
Add a file to cache the CamelCase variables found by &lt;commit&gt; to reduce
the time it takes to scan the include/ directory.

Filename is '.checkpatch-camelcase.&lt;commit&gt;' and it is created only only
if a .git directory exists.

&lt;commit&gt; is determined by the last non-merge commit id in the
include/ path.

Reduces checkpatch run time by ~12 cpu seconds on my little netbook.

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 longer logging function names</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.e.keller@intel.com</email>
</author>
<published>2013-07-03T22:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d0b6594e1055e3d4efcc28af11a8e42dd85ded4'/>
<id>urn:sha1:7d0b6594e1055e3d4efcc28af11a8e42dd85ded4</id>
<content type='text'>
The current $logFunction regular expression allows names like dev_warn,
e_dbg, netdev_info, etc, but some log functions are now written like
e_dev_warn, so allow 1 or 2 word blocks with an underscore before the
logging level.

Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
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: ignore existing CamelCase uses from include/...</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3445686af721534ac1086a9c6d48b3470dfb6946'/>
<id>urn:sha1:3445686af721534ac1086a9c6d48b3470dfb6946</id>
<content type='text'>
When using --strict, CamelCase uses are described with CHECK: messages.
These CamelCase uses may be acceptable and should not generate these
messages when the variable is already defined in a file from the
include/...  path.

So, change checkpatch to read all the .h files in include/...  and look
for preexisting CamelCase #defines, typedefs and function prototypes.

Add these to the existing camelcase hash so that any uses in the patch or
file can be ignored.

There are currently ~3500 files in include/.  It takes about 10 cpu
seconds on my little netbook to grep for and preseed these existing uses.

That's about 4x the time for a similar git grep.

This preseeding is only done once when using --strict and only when there
is a CamelCase use found.

If a .git directory is found, it uses 'git ls-files include' If not, it
uses 'find $root/include -name "*.h"

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: 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: ignore SI unit CamelCase variants like "_uV"</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22735ce857a2d9f4e6eec37c36be3fcf9d21d154'/>
<id>urn:sha1:22735ce857a2d9f4e6eec37c36be3fcf9d21d154</id>
<content type='text'>
Many existing variable names use SI like variants that should be otherwise
obvious and acceptable.

Whitelist them from the CamelCase message.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Phil Carmody &lt;phil.carmody@partner.samsung.com&gt;
Acked-by: Phil Carmody &lt;phil.carmody@partner.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: move test for space before semicolon after operator spacing</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=786b632622800d73d9b0355c9a79b3f3b5792c6c'/>
<id>urn:sha1:786b632622800d73d9b0355c9a79b3f3b5792c6c</id>
<content type='text'>
Moving this test allows the --fix option to work better.

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: create an EXPERIMENTAL --fix option to correct patches</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3705ce5bcc1037b68e9d20f90ab50bc7f64edd00'/>
<id>urn:sha1:3705ce5bcc1037b68e9d20f90ab50bc7f64edd00</id>
<content type='text'>
Some patches have simple defects in whitespace and formatting that
checkpatch could correct automatically.  Attempt to do so.

Add a --fix option to create a "&lt;inputfile&gt;.EXPERIMENTAL-checkpatch-fixes"
file that tries to use normal kernel style for some of these formatting
errors.

Add warnings against using this file without verifying the changes.

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: improve "no space after cast" test</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23f780c90496eb1cc158e862e7035c8468dfa052'/>
<id>urn:sha1:23f780c90496eb1cc158e862e7035c8468dfa052</id>
<content type='text'>
Some false positives exist on this test.

For instance:
	*va_arg(args, signed char *) = val.s;
or
	memset(foo, 0, sizeof(struct bar *) * baz));

Ignore lines that have an arithmetic operator or assignment
after what appears to be a cast to a pointer "(foo *)".

Add $Arithmetic convenience variable.

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: add a --strict test for comparison to true/false</title>
<updated>2013-07-03T23:07:45Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=179f8f40fc3ae7cd49e96b3a7d5182166c36bdab'/>
<id>urn:sha1:179f8f40fc3ae7cd49e96b3a7d5182166c36bdab</id>
<content type='text'>
Comparing to true or false is error prone.

Add tests for the various forms of (foo == true) &amp;&amp; (false != bar)
that are only reported 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>
</entry>
<entry>
<title>checkpatch: don't warn on blank lines before/after braces as often</title>
<updated>2013-07-03T23:07:44Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-07-03T22:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77b9a53a627491df83a75361440485629c35aa91'/>
<id>urn:sha1:77b9a53a627491df83a75361440485629c35aa91</id>
<content type='text'>
Check to make sure the blank lines aren't comment lines like:

  bool foo(bool bar)
  {
	/* Don't warn on a leading comment */
	return !bar;
	/* Don't warn on a trailing comment either */
  }

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>
