<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/scripts/checkpatch.pl, branch akpm</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=akpm</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=akpm'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2022-06-28T06:54:02+00:00</updated>
<entry>
<title>Merge branch 'mm-nonmm-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2022-06-28T06:54:02+00:00</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2022-06-28T06:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8f850ad6cf932b8b5125f9585cb397e08403cccd'/>
<id>urn:sha1:8f850ad6cf932b8b5125f9585cb397e08403cccd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git</title>
<updated>2022-06-28T05:41:14+00:00</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2022-06-28T05:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6d2c4faac6e3168b1ad7f77a8ac59dd8311cdb24'/>
<id>urn:sha1:6d2c4faac6e3168b1ad7f77a8ac59dd8311cdb24</id>
<content type='text'>
# Conflicts:
#	Makefile
#	include/uapi/linux/android/binder.h
</content>
</entry>
<entry>
<title>checkpatch: fix incorrect camelcase detection on numeric constant</title>
<updated>2022-06-17T02:58:22+00:00</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2022-06-13T10:00:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f858e23a29740757fe1ca602cb1f57845034b1c5'/>
<id>urn:sha1:f858e23a29740757fe1ca602cb1f57845034b1c5</id>
<content type='text'>
The code fragment below

	int foo(int *array, int index)
	{
		return array[index &amp; 0xFF];
	}

triggers an incorrect camelcase detection by checking a substring of the
hex constant:

	CHECK: Avoid CamelCase: &lt;xFF&gt;
	#3: FILE: test.c:3:
	+	return array[index &amp; 0xFF];

This is caused by passing the whole string "array[index &amp; 0xFF]" to the
inner loop that iterates over a "$Ident" match.  The numeric constant is
not a $Ident as it doesn't start with [A-Za-z_] and should be excluded
from the match.

Similar issue can be detected with other constants like "1uL", "0xffffU".

Force the match to start at word boundary so the $Ident will be properly
checked starting from its first char and the constants will be
filtered-out.

Link: https://lkml.kernel.org/r/20220613100055.77821-1-borneo.antonio@gmail.com
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add XA_STATE and XA_STATE_ORDER to the macro declaration list</title>
<updated>2022-06-17T02:58:19+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2022-05-25T19:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dcea7964764aad41c2994084a4c0292371b14e36'/>
<id>urn:sha1:dcea7964764aad41c2994084a4c0292371b14e36</id>
<content type='text'>
XA_STATE() and XA_STATE_ORDER macro uses are declarations.

Add them to the declaration macro list to avoid suggesting a blank line
after declarations when used.

Link: https://lkml.kernel.org/r/144314f4bf2c58cf2336028a75a5127e848abd81.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: checkpatch: enable language-independent checks for Rust</title>
<updated>2022-05-23T00:24:55+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2022-05-22T15:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b04a582e3cc0ae29dcf8182f3c3006af4169d9ea'/>
<id>urn:sha1:b04a582e3cc0ae29dcf8182f3c3006af4169d9ea</id>
<content type='text'>
Include Rust in the "source code files" category, so that
the language-independent tests are checked for Rust too,
and teach `checkpatch` about the comment style for Rust files.

This enables the malformed SPDX check, the misplaced SPDX license
tag check, the long line checks, the lines without a newline check
and the embedded filename check.

Co-developed-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Signed-off-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Co-developed-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: checkpatch: diagnose uses of `%pA` in the C side</title>
<updated>2022-05-23T00:24:55+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2022-05-22T01:11:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=59cda43d682e9903b2949164c966b0dbfa3f9345'/>
<id>urn:sha1:59cda43d682e9903b2949164c966b0dbfa3f9345</id>
<content type='text'>
The `%pA` format specifier is only intended to be used from Rust.

`checkpatch.pl` already gives a warning for invalid specificers:

    WARNING: Invalid vsprintf pointer extension '%pA'

With this change, we introduce an error message with further
explanation:

    ERROR: '%pA' is only intended to be used from Rust code

Suggested-by: Kees Cook &lt;keescook@chromium.org&gt;
Co-developed-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Signed-off-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;
Co-developed-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add new alloc functions to alloc with multiplies check</title>
<updated>2022-04-26T06:30:33+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2022-04-26T05:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=73f1d07e5f8a1dec989a5ec964f5f2ce5b6f8825'/>
<id>urn:sha1:73f1d07e5f8a1dec989a5ec964f5f2ce5b6f8825</id>
<content type='text'>
kvmalloc() and kvzalloc() functions have now 2-factor multiplication
argument forms kvmalloc_array() and kvcalloc(), correspondingly.

Add alloc-with-multiplies checks for these new functions.

Link: https://github.com/KSPP/linux/issues/187
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: use python3 to find codespell dictionary</title>
<updated>2022-03-24T02:00:34+00:00</updated>
<author>
<name>Sagar Patel</name>
<email>sagarmp@cs.unc.edu</email>
</author>
<published>2022-03-23T23:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c882c6b1cb3105d378768aa168d2283f50b6e304'/>
<id>urn:sha1:c882c6b1cb3105d378768aa168d2283f50b6e304</id>
<content type='text'>
Commit 0ee3e7b8893e ("checkpatch: get default codespell dictionary path
from package location") introduced the ability to search for the
codespell dictionary rather than hardcoding its path.

codespell requires Python 3.6 or above, but on some systems, the python
executable is a Python 2.7 interpreter.  In this case, searching for the
dictionary fails, subsequently making codespell fail:

  No codespell typos will be found - file '/usr/share/codespell/dictionary.txt': No such file or directory

So, use python3 to remove ambiguity.

In addition, when searching for dictionary.txt, do not check if the
codespell executable exists since,

 - checkpatch.pl only uses dictionary.txt, not the codespell
   executable.

 - codespell can be installed via a Python package manager, in which
   case the codespell executable may not be present in a typical $PATH,
   but a dictionary does exist.

Link: https://lkml.kernel.org/r/20220309180048.147672-1-sagarmp@cs.unc.edu
Signed-off-by: Sagar Patel &lt;sagarmp@cs.unc.edu&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.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: add early_param exception to blank line after struct/function test</title>
<updated>2022-03-24T02:00:34+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2022-03-23T23:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=05dc40e694e0ff527011d0b09542f08da60e28cc'/>
<id>urn:sha1:05dc40e694e0ff527011d0b09542f08da60e28cc</id>
<content type='text'>
Add early_param as another exception to the blank line preferred after
function/struct/union declaration or definition test.

Link: https://lkml.kernel.org/r/3bd6ada59f411a7685d7e64eeb670540d4bfdcde.camel@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.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 some TRAILING_STATEMENTS</title>
<updated>2022-03-24T02:00:34+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2022-03-23T23:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=481efd7bd6f28febddf189e7a970bb0bc5a53de8'/>
<id>urn:sha1:481efd7bd6f28febddf189e7a970bb0bc5a53de8</id>
<content type='text'>
Single line code like:

	if (foo) bar;

should generally be written:

	if (foo)
		bar;

Add a --fix test to do so.

This fix is not done when an ASSIGN_IN_IF in the same line exists.

Link: https://lkml.kernel.org/r/20220128185924.80137-2-joe@perches.com
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.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>
</feed>
