<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/checkpatch.pl, branch v4.19.114</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.114</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.114'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-09-04T23:45:02Z</updated>
<entry>
<title>checkpatch: add __ro_after_init to known $Attribute</title>
<updated>2018-09-04T23:45:02Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-09-04T22:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5967e989f1fe702e75d7405b9251ec7e490d847'/>
<id>urn:sha1:c5967e989f1fe702e75d7405b9251ec7e490d847</id>
<content type='text'>
__ro_after_init is a specific __attribute__ that checkpatch does currently
not understand.

Add it to the known $Attribute types so that code that uses variables
declared with __ro_after_init are not thought to be a modifier type.

This appears as a defect in checkpatch output of code like:

static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
[...]
       if (trust_cpu &amp;&amp; arch_init) {

where checkpatch reports:

ERROR: space prohibited after that '&amp;&amp;' (ctx:WxW)
	if (trust_cpu &amp;&amp; arch_init) {

Link: http://lkml.kernel.org/r/0fa8a2cb83ade4c525e18261ecf6cfede3015983.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Kees Cook &lt;keescook@chromium.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 optional static const to blank line declarations test</title>
<updated>2018-09-04T23:45:02Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-09-04T22:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=328b5f417a4ac929e20d98b989a2babac66c8520'/>
<id>urn:sha1:328b5f417a4ac929e20d98b989a2babac66c8520</id>
<content type='text'>
Using a static const struct definition as part of a series of
declarations produces a false positive "Missing a blank line after
declarations" for code like:

  WARNING: Missing a blank line after declarations
  #710: FILE: drivers/gpu/drm/tidss/tidss_scale_coefs.c:137:
  +       int inc;
  +       static const struct {

So fix it.

Link: http://lkml.kernel.org/r/5905126e70b0ed1781e49265fd5c49c5090d0223.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Jyri Sarha &lt;jsarha@ti.com&gt;
Cc: "Valkeinen, Tomi" &lt;tomi.valkeinen@ti.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: DT bindings should be a separate patch</title>
<updated>2018-08-22T17:52:49Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2018-08-22T04:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=133712a2ec8493596565e9de3d25659d6e66a47e'/>
<id>urn:sha1:133712a2ec8493596565e9de3d25659d6e66a47e</id>
<content type='text'>
Devicetree bindings should be their own patch as documented in
Documentation/devicetree/bindings/submitting-patches.txt section I.1.
This is because bindings are logically independent from a driver
implementation, they have a different maintainer (even though they often
are applied via the same tree), and it makes for a cleaner history in the
DT only tree created with git-filter-branch.

[robh@kernel.org: add doc pointer to warning, simplify logic]
  Link: http://lkml.kernel.org/r/20180810170513.26284-1-robh@kernel.org
[robh@kernel.org: v3]
  Link: http://lkml.kernel.org/r/20180810225049.20452-1-robh@kernel.org
Link: http://lkml.kernel.org/r/20180809205032.22205-1-robh@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-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: warn on unnecessary int declarations</title>
<updated>2018-08-22T17:52:49Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-08-22T04:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=809e082e973da2c7b751dab9348853cb8cc3f25c'/>
<id>urn:sha1:809e082e973da2c7b751dab9348853cb8cc3f25c</id>
<content type='text'>
On Sun, 2018-08-05 at 08:52 -0700, Linus Torvalds wrote:
&gt; "long unsigned int" isn't _technically_ wrong. But we normally
&gt; call that type "unsigned long".

So add a checkpatch test for it.

Link: http://lkml.kernel.org/r/7bbd97dc0a1e5896a0251fada7bb68bb33643f77.camel@perches.com
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: check for space after "else" keyword</title>
<updated>2018-08-22T17:52:49Z</updated>
<author>
<name>Michal Zylowski</name>
<email>michal.zylowski@intel.com</email>
</author>
<published>2018-08-22T04:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6ad724e2a48fc24dd9788490d85a3490cb0117c1'/>
<id>urn:sha1:6ad724e2a48fc24dd9788490d85a3490cb0117c1</id>
<content type='text'>
Current checkpatch implementation permits notation like

	} else{

in kernel code.  It looks like oversight and inconsistency in checkpatch
rules (e.g.  instruction like 'do' is tested).

Add regex for checking space after 'else' keyword and trigger error if
space is not present.

Link: http://lkml.kernel.org/r/1533545753-8870-1-git-send-email-michal.zylowski@intel.com
Signed-off-by: Michal Zylowski &lt;michal.zylowski@intel.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;
</content>
</entry>
<entry>
<title>checkpatch: fix SPDX license check with --root=&lt;path&gt;</title>
<updated>2018-08-22T17:52:49Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-08-22T04:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56294112791ac11c6fcdc6544f1381f9272202db'/>
<id>urn:sha1:56294112791ac11c6fcdc6544f1381f9272202db</id>
<content type='text'>
checkpatch uses the in-kernel script spdxcheck.py to validate the specific
license in a file or script.

This check can currently fail for a couple reasons:

o spdxcheck.py assumes the existence of git tree that may not
  exist for a bare source tree from something like a tarball
o the spdxcheck.py must be run from the top level root directory

So add a git existence test and set the subprocess subdirectory.

Link: http://lkml.kernel.org/r/2b32864324ae9c92948b002ec4c0c22409ed98f1.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Charlemagne Lasse &lt;charlemagnelasse@gmail.com&gt;
Tested-by: Charlemagne Lasse &lt;charlemagnelasse@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 when a patch doesn't have a description</title>
<updated>2018-08-22T17:52:48Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-08-22T04:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=490b292c834c5e72057f4315ef915692cbd6defd'/>
<id>urn:sha1:490b292c834c5e72057f4315ef915692cbd6defd</id>
<content type='text'>
Potential patches should have a commit description.  Emit a warning when
there isn't one.

[akpm@linux-foundation.org: s/else if/elsif/]
Link: http://lkml.kernel.org/r/1b099f4d8373aa583a17011992676bf0f3f09eee.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Prakruthi Deepak Heragu &lt;pheragu@codeaurora.org&gt;
Reviewed-by: 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: check for #if 0/#if 1</title>
<updated>2018-08-22T17:52:48Z</updated>
<author>
<name>Prakruthi Deepak Heragu</name>
<email>pheragu@codeaurora.org</email>
</author>
<published>2018-08-22T04:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=60f890105547f7a48ea1d67c5ae69966c7245b23'/>
<id>urn:sha1:60f890105547f7a48ea1d67c5ae69966c7245b23</id>
<content type='text'>
The #if 0 or #if 1 is used to toggle features. Warn if #if 0 or #if 1
is present and suggest that they can be removed.

[akpm@linux-foundation.org: fix spacing around periods, per Joe\
Link: http://lkml.kernel.org/r/1532625218-24321-1-git-send-email-pheragu@codeaurora.org
Signed-off-by: Abhijeet Dharmapurikar &lt;adharmap@codeaurora.org&gt;
Signed-off-by: Prakruthi Deepak Heragu &lt;pheragu@codeaurora.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: fix krealloc reuse test</title>
<updated>2018-08-22T17:52:48Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-08-22T04:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4cab63cea374c684eb0db352b40a09e3f7c45057'/>
<id>urn:sha1:4cab63cea374c684eb0db352b40a09e3f7c45057</id>
<content type='text'>
The current krealloc test does not function correctly when the temporary
pointer return name contains the original pointer name.

Fix that by maximally matching the return pointer name and the original
pointer name and doing a separate comparison of the both names.

Link: http://lkml.kernel.org/r/e617ecb8c019a9c4c56540a1bec16c8aed43a4e4.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Manish Narani &lt;manish.narani@xilinx.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: validate SPDX license with spdxcheck.py</title>
<updated>2018-08-22T17:52:48Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-08-22T04:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b6e8ac9e740b71b07df4a1e89ba5841686d8e9f'/>
<id>urn:sha1:3b6e8ac9e740b71b07df4a1e89ba5841686d8e9f</id>
<content type='text'>
Use the existing scripts/spdxcheck.py to validate any
SPDX-License-Identifier found in line 1 or 2 of patches or files.

Miscellanea:

o Properly indent the existing SPDX-License-Identifier block.

Link: http://lkml.kernel.org/r/05b832407b24e0a27e419906187cd863bc1617c7.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&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>
</feed>
