<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/checkpatch.pl, branch v5.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=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-01-28T04:28:58Z</updated>
<entry>
<title>Revert "checkpatch: add check for keyword 'boolean' in Kconfig definitions"</title>
<updated>2021-01-28T04:28:58Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-01-26T19:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae9162e2be767240065b2f16c3061fc0a3622f61'/>
<id>urn:sha1:ae9162e2be767240065b2f16c3061fc0a3622f61</id>
<content type='text'>
This reverts commit 327953e9af6c59ad111b28359e59e3ec0cbd71b6.

You cannot use 'boolean' since commit b92d804a5179 ("kconfig: drop
'boolean' keyword").

This check is no longer needed.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
</content>
</entry>
<entry>
<title>checkpatch: prefer strscpy to strlcpy</title>
<updated>2020-12-29T23:36:49Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-12-29T23:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5dbdb2d87c294401a22e6a6002f08ebc9fbea38b'/>
<id>urn:sha1:5dbdb2d87c294401a22e6a6002f08ebc9fbea38b</id>
<content type='text'>
Prefer strscpy over the deprecated strlcpy function.

Link: https://lkml.kernel.org/r/19fe91084890e2c16fe56f960de6c570a93fa99b.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Requested-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 printk_once and printk_ratelimit to prefer pr_&lt;level&gt; warning</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-12-16T04:45:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5eea3b0442da801404859a780c02721d649f02f'/>
<id>urn:sha1:f5eea3b0442da801404859a780c02721d649f02f</id>
<content type='text'>
Add the _once and _ratelimited variants to the test for
printk(KERN_&lt;LEVEL&gt; that should prefer pr_&lt;level&gt;.

Miscellanea:

o Add comment description for the conversions

[joe@perches.com: fixlet]
  Link: https://lkml.kernel.org/r/32260871d4718ba7f48a8e9e07452bb76de300db.camel@perches.comLink: https://lkml.kernel.org/r/993b72b2ef91a57c5e725b52971ce3fd31375061.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: fix TYPO_SPELLING check for words with apostrophe</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Dwaipayan Ray</name>
<email>dwaipayanray1@gmail.com</email>
</author>
<published>2020-12-16T04:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7da07c31b1df1fa973d184378862443302fd1129'/>
<id>urn:sha1:7da07c31b1df1fa973d184378862443302fd1129</id>
<content type='text'>
checkpatch reports a false TYPO_SPELLING warning for some words containing
an apostrophe when run with --codespell option.

A false positive is "doesn't".  Occurrence of the word causes checkpatch
to emit the following warning:

"WARNING: 'doesn'' may be misspelled - perhaps 'doesn't'?"

Modify the regex pattern to be more in line with the codespell default
word matching regex.  This fixes the word capture and avoids the false
warning.

In addition, highlight the misspelled word location by adding a caret
below the word.

[akpm@linux-foundation.org: make matched misspelling more obvious, per Joe]
  Link: https://lkml.kernel.org/r/09c24ef1aa2f1c4fe909d76f5426f08780b9d81c.camel@perches.com

Link: https://lkml.kernel.org/r/20201201190729.169733-1-dwaipayanray1@gmail.com
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Peilin Ye &lt;yepeilin.cs@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;
</content>
</entry>
<entry>
<title>checkpatch: add warning for lines starting with a '#' in commit log</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Dwaipayan Ray</name>
<email>dwaipayanray1@gmail.com</email>
</author>
<published>2020-12-16T04:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=084a617acfa08118eafb51a6ef43e6fa4705853d'/>
<id>urn:sha1:084a617acfa08118eafb51a6ef43e6fa4705853d</id>
<content type='text'>
Commit log lines starting with '#' are dropped by git as comments.
Add a check to emit a warning for these lines.

Also add a --fix option to insert a space before the leading '#' in
such lines.

Link: https://lkml.kernel.org/r/20201202205740.127986-1-dwaipayanray1@gmail.com
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Peilin Ye &lt;yepeilin.cs@gmail.com&gt;
Tested-by: Peilin Ye &lt;yepeilin.cs@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;
</content>
</entry>
<entry>
<title>checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Dwaipayan Ray</name>
<email>dwaipayanray1@gmail.com</email>
</author>
<published>2020-12-16T04:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70eb2275ff8e0b4cafe67176674d580c987c071d'/>
<id>urn:sha1:70eb2275ff8e0b4cafe67176674d580c987c071d</id>
<content type='text'>
Modifiers %h and %hh should never be used.

Commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
unnecessary %h[xudi] and %hh[xudi]") specifies that:

 "Standard integer promotion is already done and %hx and %hhx is useless
  so do not encourage the use of %hh[xudi] or %h[xudi]."

 "The "h" and "hh" things should never be used. The only reason for them
  being used if you have an "int", but you want to print it out as a
  "char" (and honestly, that is a really bad reason, you'd be better off
  just using a proper cast to make the code more obvious)."

Add a new check to emit a warning on finding an unneeded use of %h or
%hh modifier.

Also add a fix option to the check.

Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.camel@perches.com/
Link: https://lkml.kernel.org/r/20201128200046.78739-1-dwaipayanray1@gmail.com
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@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;
</content>
</entry>
<entry>
<title>checkpatch: add fix and improve warning msg for non-standard signature</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Aditya Srivastava</name>
<email>yashsri421@gmail.com</email>
</author>
<published>2020-12-16T04:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=831242ab8dffab4cf2f89c597d5902ac86caeefe'/>
<id>urn:sha1:831242ab8dffab4cf2f89c597d5902ac86caeefe</id>
<content type='text'>
Currently checkpatch warns for BAD_SIGN_OFF on non-standard signature
styles.

A large number of these warnings occur because of typo mistakes in
signature tags.  An evaluation over v4.13..v5.8 showed that out of 539
warnings due to non-standard signatures, 87 are due to typo mistakes.

Following are the standard signature tags which are often incorrectly
used, along with their individual counts of incorrect use (over
v4.13..v5.8):

 Reviewed-by: 42
 Signed-off-by: 25
 Reported-by: 6
 Acked-by: 4
 Tested-by: 4
 Suggested-by: 4

Provide a fix by calculating levenshtein distance for the signature tag
with all the standard signatures and suggest a fix with a signature, whose
edit distance is less than or equal to 2 with the misspelled signature.

Out of the 86 mispelled signatures fixed with this approach, 85 were found
to be good corrections and 1 was bad correction.

Following was found to be a bad correction:
 Tweeted-by (count: 1) =&gt; Tested-by

Link: https://lkml.kernel.org/r/20201128204333.7054-1-yashsri421@gmail.com
Signed-off-by: Aditya Srivastava &lt;yashsri421@gmail.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@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: add fix option for LOGICAL_CONTINUATIONS</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Aditya Srivastava</name>
<email>yashsri421@gmail.com</email>
</author>
<published>2020-12-16T04:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e08f0765f3744c65e2c8c570004079883b2f546'/>
<id>urn:sha1:8e08f0765f3744c65e2c8c570004079883b2f546</id>
<content type='text'>
Currently, checkpatch warns if logical continuations are placed at the
start of a line and not at the end of previous line.

E.g., running checkpatch on commit 3485507fc272 ("staging: bcm2835-camera:
Reduce length of enum names") reports:

  CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line
  +	if (!ret
  +	    &amp;&amp; camera_port ==

Provide a simple fix by inserting logical operator at the last
non-comment, non-whitespace char of the previous line and removing from
current line, if both the lines are additions(ie start with '+')

Link: https://lkml.kernel.org/r/20201123102818.24364-1-yashsri421@gmail.com
Signed-off-by: Aditya Srivastava &lt;yashsri421@gmail.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@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: add fix option for ASSIGNMENT_CONTINUATIONS</title>
<updated>2020-12-16T06:46:17Z</updated>
<author>
<name>Aditya Srivastava</name>
<email>yashsri421@gmail.com</email>
</author>
<published>2020-12-16T04:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da7355ab4e4a0021924e87acce2b9fb7e6f3264e'/>
<id>urn:sha1:da7355ab4e4a0021924e87acce2b9fb7e6f3264e</id>
<content type='text'>
Currently, checkpatch warns us if an assignment operator is placed at the
start of a line and not at the end of previous line.

E.g., running checkpatch on commit 8195b1396ec8 ("hv_netvsc: fix
deadlock on hotplug") reports:

  CHECK: Assignment operator '=' should be on the previous line
  +	struct netvsc_device *nvdev
  +		= container_of(w, struct netvsc_device, subchan_work);

Provide a simple fix by appending assignment operator to the previous
line and removing from the current line, if both the lines are additions
(ie start with '+')

Link: https://lkml.kernel.org/r/20201121120407.22942-1-yashsri421@gmail.com
Signed-off-by: Aditya Srivastava &lt;yashsri421@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;
</content>
</entry>
<entry>
<title>checkpatch: fix unescaped left brace</title>
<updated>2020-12-16T06:46:17Z</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.shady.money/linux/commit/?id=03f4935135b9efeb780b970ba023c201f81cf4e6'/>
<id>urn:sha1:03f4935135b9efeb780b970ba023c201f81cf4e6</id>
<content type='text'>
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;
</content>
</entry>
</feed>
