<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/checkpatch.pl, branch v2.6.35</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=v2.6.35</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.35'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-05-25T15:07:06Z</updated>
<entry>
<title>checkpatch: warn on declaration with storage class not at the beginning</title>
<updated>2010-05-25T15:07:06Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2010-05-24T21:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d4977c78e9c7dd042f96f4a21d957bc25a561333'/>
<id>urn:sha1:d4977c78e9c7dd042f96f4a21d957bc25a561333</id>
<content type='text'>
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&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>
</entry>
<entry>
<title>checkpatch: add check for too short Kconfig descriptions</title>
<updated>2010-05-25T15:07:06Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2010-05-24T21:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3354957a4f8b9bb4b43625232acdf0626851c82f'/>
<id>urn:sha1:3354957a4f8b9bb4b43625232acdf0626851c82f</id>
<content type='text'>
I've seen various new Kconfigs with rather unhelpful one liner
descriptions.  Add a Kconfig warning for a minimum length of the Kconfig
help section.

Right now I arbitarily chose 4. The exact value can be debated.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen &lt;ak@linux.intel.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>
</entry>
<entry>
<title>lockdep: Add novalidate class for dev-&gt;mutex conversion</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2010-03-19T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1704f47b50b5d9e1b825e43e1baaf2c5897baf03'/>
<id>urn:sha1:1704f47b50b5d9e1b825e43e1baaf2c5897baf03</id>
<content type='text'>
The conversion of device-&gt;sem to device-&gt;mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.

Add a checkpatch error so the usage is reserved for device-&gt;mutex.

[ tglx: checkpatch and compile fix for LOCKDEP=n ]

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>checkpatch: warn on unnecessary spaces before quoted newlines</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-03-05T21:43:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e79d96eed306a8b4af67b3f35f6867edfabeebc'/>
<id>urn:sha1:5e79d96eed306a8b4af67b3f35f6867edfabeebc</id>
<content type='text'>
Signed-off-by: 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>
</entry>
<entry>
<title>checkpatch.pl: warn if an adding line introduce spaces before tabs.</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Alberto Panizzo</name>
<email>maramaopercheseimorto@gmail.com</email>
</author>
<published>2010-03-05T21:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08e4436566250cb98b3f3ac37643b1cf09481256'/>
<id>urn:sha1:08e4436566250cb98b3f3ac37643b1cf09481256</id>
<content type='text'>
Signed-off-by: Alberto Panizzo &lt;maramaopercheseimorto@gmail.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>
</entry>
<entry>
<title>checkpatch.pl: extend list of expected-to-be-const structures</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Emese Revfy</name>
<email>re.emese@gmail.com</email>
</author>
<published>2010-03-05T21:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79404849e90a41ea2109bd0e2f7c7164b0c4ce73'/>
<id>urn:sha1:79404849e90a41ea2109bd0e2f7c7164b0c4ce73</id>
<content type='text'>
Based on Arjan's suggestion, extend the list of ops structures that should
be const.

Signed-off-by: Emese Revfy &lt;re.emese@gmail.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.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.pl: add union and struct to the exceptions list</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2010-03-05T21:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22fd2d3e4f75a2596ccdfdcbdfd505c9c60bf346'/>
<id>urn:sha1:22fd2d3e4f75a2596ccdfdcbdfd505c9c60bf346</id>
<content type='text'>
Here is a small code snippet, which will be complained about by
checkpatch.pl:

#define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \
	union { \
		struct { \
			unsigned int	in; \
			unsigned int	out; \
		}; \
		char		rectype[recsize]; \
		ptrtype		*ptr; \
		const ptrtype	*ptr_const; \
	};

This construct is legal and safe, so checkpatch.pl should accept this.  It
should be also true for struct defined in a macro.

Add the `struct' and `union' keywords to the exceptions list of the
checkpatch.pl script, to prevent error message "Macros with multiple
statements should be enclosed in a do - while loop".  Otherwise it is not
possible to build a struct or union with a macro.

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&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>
</entry>
<entry>
<title>checkpatch: fix false positive on __initconst</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2010-03-05T21:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52131292c069b74f4b5f3c786ff66ff6e82b0e69'/>
<id>urn:sha1:52131292c069b74f4b5f3c786ff66ff6e82b0e69</id>
<content type='text'>
checkpatch falsely complained about '__initconst' because it thought the
'const' needed a space before.  Fix this by changing the list of
attributes:

- add '__initconst'
- force plain 'init' to contain a word-boundary at the end

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&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>
</entry>
<entry>
<title>checkpatch.pl: allow &gt; 80 char lines for logging functions not just printk</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-03-05T21:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=691e669ba8c64d31ac08d87b1751e6acfa3ff65e'/>
<id>urn:sha1:691e669ba8c64d31ac08d87b1751e6acfa3ff65e</id>
<content type='text'>
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: trivial fix for trailing statements check</title>
<updated>2010-03-06T19:26:44Z</updated>
<author>
<name>Hidetoshi Seto</name>
<email>seto.hidetoshi@jp.fujitsu.com</email>
</author>
<published>2010-03-05T21:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42bdf74c95b6935f3c09a09ba4bead6cad11b540'/>
<id>urn:sha1:42bdf74c95b6935f3c09a09ba4bead6cad11b540</id>
<content type='text'>
In case if the statement and the conditional are in one line, the line
appears in the report doubly.

And items of this check have no blank line before the next item.

This patch fixes these trivial problems, to improve readability of the
report.

[sample.c]
  &gt; if (cond1
  &gt;        &amp;&amp; cond2
  &gt;        &amp;&amp; cond3) func_foo();
  &gt;
  &gt; if (cond4) func_bar();

Before:
  &gt; ERROR: trailing statements should be on next line
  &gt; #1: FILE: sample.c:1:
  &gt; +if (cond1
  &gt; [...]
  &gt; +       &amp;&amp; cond3) func_foo();
  &gt; ERROR: trailing statements should be on next line
  &gt; #5: FILE: sample.c:5:
  &gt; +if (cond4) func_bar();
  &gt; +if (cond4) func_bar();
  &gt; total: 2 errors, 0 warnings, 5 lines checked

After:
  &gt; ERROR: trailing statements should be on next line
  &gt; #1: FILE: sample.c:1:
  &gt; +if (cond1
  &gt; [...]
  &gt; +       &amp;&amp; cond3) func_foo();
  &gt;
  &gt; ERROR: trailing statements should be on next line
  &gt; #5: FILE: sample.c:5:
  &gt; +if (cond4) func_bar();
  &gt;
  &gt; total: 2 errors, 0 warnings, 5 lines checked

Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.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>
</feed>
