<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/checkpatch.pl, branch v5.4.150</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.150</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.150'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-12-30T10:51:27Z</updated>
<entry>
<title>checkpatch: fix unescaped left brace</title>
<updated>2020-12-30T10:51:27Z</updated>
<author>
<name>Dwaipayan Ray</name>
<email>dwaipayanray1@gmail.com</email>
</author>
<published>2020-12-16T04:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f5b56b5a71d11f96909d913581dbfb7e1d0f8ce'/>
<id>urn:sha1:9f5b56b5a71d11f96909d913581dbfb7e1d0f8ce</id>
<content type='text'>
[ Upstream commit 03f4935135b9efeb780b970ba023c201f81cf4e6 ]

There is an unescaped left brace in a regex in OPEN_BRACE check.  This
throws a runtime error when checkpatch is run with --fix flag and the
OPEN_BRACE check is executed.

Fix it by escaping the left brace.

Link: https://lkml.kernel.org/r/20201115202928.81955-1-dwaipayanray1@gmail.com
Fixes: 8d1824780f2f ("checkpatch: add --fix option for a couple OPEN_BRACE misuses")
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@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: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: fix the usage of capture group ( ... )</title>
<updated>2020-09-09T17:12:37Z</updated>
<author>
<name>Mrinal Pandey</name>
<email>mrinalmni@gmail.com</email>
</author>
<published>2020-09-04T23:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2cd86225c89a51e5a5633833d107a46e1affad6'/>
<id>urn:sha1:f2cd86225c89a51e5a5633833d107a46e1affad6</id>
<content type='text'>
commit 13e45417cedbfc44b1926124b1846f5ee8c6ba4a upstream.

The usage of "capture group (...)" in the immediate condition after `&amp;&amp;`
results in `$1` being uninitialized.  This issues a warning "Use of
uninitialized value $1 in regexp compilation at ./scripts/checkpatch.pl
line 2638".

I noticed this bug while running checkpatch on the set of commits from
v5.7 to v5.8-rc1 of the kernel on the commits with a diff content in
their commit message.

This bug was introduced in the script by commit e518e9a59ec3
("checkpatch: emit an error when there's a diff in a changelog").  It
has been in the script since then.

The author intended to store the match made by capture group in variable
`$1`.  This should have contained the name of the file as `[\w/]+`
matched.  However, this couldn't be accomplished due to usage of capture
group and `$1` in the same regular expression.

Fix this by placing the capture group in the condition before `&amp;&amp;`.
Thus, `$1` can be initialized to the text that capture group matches
thereby setting it to the desired and required value.

Fixes: e518e9a59ec3 ("checkpatch: emit an error when there's a diff in a changelog")
Signed-off-by: Mrinal Pandey &lt;mrinalmni@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Tested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Link: https://lkml.kernel.org/r/20200714032352.f476hanaj2dlmiot@mrinalpandey
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: check for nested (un)?likely() calls</title>
<updated>2019-09-26T00:51:42Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2019-09-25T23:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de3f186f87cf15bed8d13fedafb5bcad0167fc6d'/>
<id>urn:sha1:de3f186f87cf15bed8d13fedafb5bcad0167fc6d</id>
<content type='text'>
IS_ERR(), IS_ERR_OR_NULL(), IS_ERR_VALUE() and WARN*() already contain
unlikely() optimization internally.  Thus, there is no point in calling
these functions and defines under likely()/unlikely().

This check is based on the coccinelle rule developed by Enrico Weigelt
https://lore.kernel.org/lkml/1559767582-11081-1-git-send-email-info@metux.net/

Link: http://lkml.kernel.org/r/20190829165025.15750-1-efremov@linux.com
Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Anton Altaparmakov &lt;anton@tuxera.com&gt;
Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Cc: Boris Pismenny &lt;borisp@mellanox.com&gt;
Cc: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Denis Efremov &lt;efremov@linux.com&gt;
Cc: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Cc: Inaky Perez-Gonzalez &lt;inaky.perez-gonzalez@intel.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Leon Romanovsky &lt;leon@kernel.org&gt;
Cc: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&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 git output use LANGUAGE=en_US.utf8</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2019-09-25T23:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dbbf869da3adeba4a6beae4ecc184e47a16d078d'/>
<id>urn:sha1:dbbf869da3adeba4a6beae4ecc184e47a16d078d</id>
<content type='text'>
git output parsing depends on the language being en_US english.

Make the backtick execution of all `git &lt;foo&gt;` commands set the
LANGUAGE of the process to en_US.utf8 before executing the actual
command using `export LANGUAGE=en_US.utf8; git &lt;foo&gt;`.

Because the command is executed in a child process, the parent
LANGUAGE is unchanged.

Link: http://lkml.kernel.org/r/bb9f29988f3258281956680ff39c3e19e37dc0b8.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Sean Christopherson &lt;sean.j.christopherson@intel.com&gt;
Reviewed-by: Sean Christopherson &lt;sean.j.christopherson@intel.com&gt;
Tested-by: Sean Christopherson &lt;sean.j.christopherson@intel.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 obsolete period from "ambiguous SHA1" query</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Sean Christopherson</name>
<email>sean.j.christopherson@intel.com</email>
</author>
<published>2019-09-25T23:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a7f4455ad321400e1361ab94fd6858c5b2fe0cf'/>
<id>urn:sha1:5a7f4455ad321400e1361ab94fd6858c5b2fe0cf</id>
<content type='text'>
Git dropped the period from its "ambiguous SHA1" error message in commit
0c99171ad2 ("get_short_sha1: mark ambiguity error for translation"), circa
2016.  Drop the period from checkpatch's associated query so as to match
both the old and new error messages.

Link: http://lkml.kernel.org/r/20190830163103.15914-1-sean.j.christopherson@intel.com
Signed-off-by: Sean Christopherson &lt;sean.j.christopherson@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: allow consecutive close braces</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2019-09-25T23:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94fb98450456da82a16a378816390d99b85edb55'/>
<id>urn:sha1:94fb98450456da82a16a378816390d99b85edb55</id>
<content type='text'>
checkpatch allows consecutive open braces, so it should also allow
consecutive close braces.

Link: http://lkml.kernel.org/r/bfdb49ae2c3fa7b52fa168769e38b48f959880e2.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.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: prefer __section over __attribute__((section(...)))</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2019-09-25T23:46:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=462811d9d4007abe229c4cede0c124ed631da0cc'/>
<id>urn:sha1:462811d9d4007abe229c4cede0c124ed631da0cc</id>
<content type='text'>
Add another test for __attribute__((section("foo"))) uses that should be
__section(foo)

Link: http://lkml.kernel.org/r/2f374c3c27054b7f978115270d587c624d9962fc.camel@perches.com
Suggested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.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: exclude sizeof sub-expressions from MACRO_ARG_REUSE</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Brendan Jackman</name>
<email>brendan.jackman@bluwireless.co.uk</email>
</author>
<published>2019-09-25T23:46:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6dba824e9ef7155f58f11b268b0f98ecec31b723'/>
<id>urn:sha1:6dba824e9ef7155f58f11b268b0f98ecec31b723</id>
<content type='text'>
The arguments of sizeof are not evaluated so arguments are safe to re-use
in that context.  Excluding sizeof subexpressions means macros like
ARRAY_SIZE can pass checkpatch.

Link: http://lkml.kernel.org/r/20190806070833.24423-1-brendan.jackman@bluwireless.co.uk
Signed-off-by: Brendan Jackman &lt;brendan.jackman@bluwireless.co.uk&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.pl: warn on invalid commit id</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Matteo Croce</name>
<email>mcroce@redhat.com</email>
</author>
<published>2019-09-25T23:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8dd86bf746256fbf68f82bc13356244c5ad8efa'/>
<id>urn:sha1:a8dd86bf746256fbf68f82bc13356244c5ad8efa</id>
<content type='text'>
It can happen that a commit message refers to an invalid commit id,
because the referenced hash changed following a rebase, or simply by
mistake.  Add a check in checkpatch.pl which checks that an hash
referenced by a Fixes tag, or just cited in the commit message, is a valid
commit id.

    $ scripts/checkpatch.pl &lt;&lt;'EOF'
    Subject: [PATCH] test commit

    Sample test commit to test checkpatch.pl
    Commit 1da177e4c3f4 ("Linux-2.6.12-rc2") really exists,
    commit 0bba044c4ce7 ("tree") is valid but not a commit,
    while commit b4cc0b1c0cca ("unknown") is invalid.

    Fixes: f0cacc14cade ("unknown")
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    EOF
    WARNING: Unknown commit id '0bba044c4ce7', maybe rebased or not pulled?
    #8:
    commit 0bba044c4ce7 ("tree") is valid but not a commit,

    WARNING: Unknown commit id 'b4cc0b1c0cca', maybe rebased or not pulled?
    #9:
    while commit b4cc0b1c0cca ("unknown") is invalid.

    WARNING: Unknown commit id 'f0cacc14cade', maybe rebased or not pulled?
    #11:
    Fixes: f0cacc14cade ("unknown")

    total: 0 errors, 3 warnings, 4 lines checked

Link: http://lkml.kernel.org/r/20190711001640.13398-1-mcroce@redhat.com
Signed-off-by: Matteo Croce &lt;mcroce@redhat.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>
<entry>
<title>checkpatch: improve SPDX license checking</title>
<updated>2019-09-26T00:51:39Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2019-09-25T23:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ffbce8974d90efb5ced95fabc61283467c80cb0d'/>
<id>urn:sha1:ffbce8974d90efb5ced95fabc61283467c80cb0d</id>
<content type='text'>
Use perl's m@&lt;match&gt;@ match and not /&lt;match&gt;/ comparisons to avoid
an error using c90's // comment style.

Miscellanea:

o Use normal tab indentation and alignment

Link: http://lkml.kernel.org/r/5e4a8fa7901148fbcd77ab391e6dd0e6bf95777f.camel@perches.com

Link: http://lkml.kernel.org/r/f08eb62458407a145cfedf959d1091af151cd665.1563575364.git.joe@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>
</feed>
