<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/Documentation/dev-tools/checkpatch.rst, branch v6.12.80</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>scripts: checkpatch: check unused parameters for function-like macro</title>
<updated>2024-05-11T22:51:44+00:00</updated>
<author>
<name>Xining Xu</name>
<email>mac.xxn@outlook.com</email>
</author>
<published>2024-05-07T03:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b1be5844c1a0124a49a30a20a189d0a53aa10578'/>
<id>b1be5844c1a0124a49a30a20a189d0a53aa10578</id>
<content type='text'>
If function-like macros do not utilize a parameter, it might result in a
build warning.  In our coding style guidelines, we advocate for utilizing
static inline functions to replace such macros.  This patch verifies
compliance with the new rule.

For a macro such as the one below,

 #define test(a) do { } while (0)

The test result is as follows.

 WARNING: Argument 'a' is not used in function-like macro
 #21: FILE: mm/init-mm.c:20:
 +#define test(a) do { } while (0)

 total: 0 errors, 1 warnings, 8 lines checked

Link: https://lkml.kernel.org/r/20240507032757.146386-3-21cnbao@gmail.com
Signed-off-by: Xining Xu &lt;mac.xxn@outlook.com&gt;
Tested-by: Barry Song &lt;v-songbaohua@oppo.com&gt;
Signed-off-by: Barry Song &lt;v-songbaohua@oppo.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Cc: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Cc: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Cc: Charlemagne Lasse &lt;charlemagnelasse@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If function-like macros do not utilize a parameter, it might result in a
build warning.  In our coding style guidelines, we advocate for utilizing
static inline functions to replace such macros.  This patch verifies
compliance with the new rule.

For a macro such as the one below,

 #define test(a) do { } while (0)

The test result is as follows.

 WARNING: Argument 'a' is not used in function-like macro
 #21: FILE: mm/init-mm.c:20:
 +#define test(a) do { } while (0)

 total: 0 errors, 1 warnings, 8 lines checked

Link: https://lkml.kernel.org/r/20240507032757.146386-3-21cnbao@gmail.com
Signed-off-by: Xining Xu &lt;mac.xxn@outlook.com&gt;
Tested-by: Barry Song &lt;v-songbaohua@oppo.com&gt;
Signed-off-by: Barry Song &lt;v-songbaohua@oppo.com&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Cc: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Cc: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Cc: Charlemagne Lasse &lt;charlemagnelasse@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: dev-tools: checkpatch.rst: Fix grammar</title>
<updated>2024-02-12T23:42:13+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@toblux.com</email>
</author>
<published>2024-02-08T15:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6fca09b64f2e78c8dfb7d091004789c46289baa2'/>
<id>6fca09b64f2e78c8dfb7d091004789c46289baa2</id>
<content type='text'>
- s/exists/exist/
- s/maybe/may be/

Signed-off-by: Thorsten Blum &lt;thorsten.blum@toblux.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20240208152039.65293-1-thorsten.blum@toblux.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/exists/exist/
- s/maybe/may be/

Signed-off-by: Thorsten Blum &lt;thorsten.blum@toblux.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20240208152039.65293-1-thorsten.blum@toblux.com
</pre>
</div>
</content>
</entry>
<entry>
<title>checkpatch: warn for non-standard fixes tag style</title>
<updated>2022-10-03T21:21:44+00:00</updated>
<author>
<name>Niklas Söderlund</name>
<email>niklas.soderlund@corigine.com</email>
</author>
<published>2022-09-14T10:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=bd17e036b495bebbf07a5fc814c868e30e1dc131'/>
<id>bd17e036b495bebbf07a5fc814c868e30e1dc131</id>
<content type='text'>
Add a warning for fixes tags that does not follow community conventions.

Link: https://lkml.kernel.org/r/20220914100255.1048460-1-niklas.soderlund@corigine.com
Signed-off-by: Niklas Söderlund &lt;niklas.soderlund@corigine.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Reviewed-by: Louis Peens &lt;louis.peens@corigine.com&gt;
Reviewed-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Acked-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Acked-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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a warning for fixes tags that does not follow community conventions.

Link: https://lkml.kernel.org/r/20220914100255.1048460-1-niklas.soderlund@corigine.com
Signed-off-by: Niklas Söderlund &lt;niklas.soderlund@corigine.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Reviewed-by: Louis Peens &lt;louis.peens@corigine.com&gt;
Reviewed-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Acked-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Acked-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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSE"</title>
<updated>2021-10-04T23:13:53+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2021-10-04T23:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b19511926cb50d59c57189739d03c21df325710f'/>
<id>b19511926cb50d59c57189739d03c21df325710f</id>
<content type='text'>
This reverts commit cbb817fc2effcbee0eb44303eefbc8171fc2b12f.

Late-arriving nacks make it clear that I applied this one too soon.

Link: https://lore.kernel.org/lkml/CAKXUXMzEFQd1JJhx4ZbBQiuSB7Fk3bd7dwJYmPOvEtMqZopxpg@mail.gmail.com/
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit cbb817fc2effcbee0eb44303eefbc8171fc2b12f.

Late-arriving nacks make it clear that I applied this one too soon.

Link: https://lore.kernel.org/lkml/CAKXUXMzEFQd1JJhx4ZbBQiuSB7Fk3bd7dwJYmPOvEtMqZopxpg@mail.gmail.com/
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: checkpatch: add multiline, do/while, and multiple-assignment messages</title>
<updated>2021-09-27T17:42:45+00:00</updated>
<author>
<name>Utkarsh Verma</name>
<email>utkarshverma294@gmail.com</email>
</author>
<published>2021-09-25T16:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=250a0a5ba9d2cfbdb7c77b421ff1e03d630bea46'/>
<id>250a0a5ba9d2cfbdb7c77b421ff1e03d630bea46</id>
<content type='text'>
Added and documented 3 new message types:
- MULTILINE_DEREFERENCE
- SINGLE_STATEMENT_DO_WHILE_MACRO
- MULTIPLE_ASSIGNMENTS

Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210925163852.12096-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added and documented 3 new message types:
- MULTILINE_DEREFERENCE
- SINGLE_STATEMENT_DO_WHILE_MACRO
- MULTIPLE_ASSIGNMENTS

Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210925163852.12096-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSE</title>
<updated>2021-09-27T17:39:16+00:00</updated>
<author>
<name>Utkarsh Verma</name>
<email>utkarshverma294@gmail.com</email>
</author>
<published>2021-09-25T20:17:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=cbb817fc2effcbee0eb44303eefbc8171fc2b12f'/>
<id>cbb817fc2effcbee0eb44303eefbc8171fc2b12f</id>
<content type='text'>
Added and documented 3 new message types:
- UNNECESSARY_INT
- UNSPECIFIED_INT
- UNNECESSARY_ELSE

Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210925201746.15917-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added and documented 3 new message types:
- UNNECESSARY_INT
- UNSPECIFIED_INT
- UNNECESSARY_ELSE

Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210925201746.15917-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Documentation: checkpatch: Add SYMBOLIC_PERMS message</title>
<updated>2021-09-14T21:09:24+00:00</updated>
<author>
<name>Utkarsh Verma</name>
<email>utkarshverma294@gmail.com</email>
</author>
<published>2021-09-04T08:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=3454cd5616e963d76d538383250dd4467f013c68'/>
<id>3454cd5616e963d76d538383250dd4467f013c68</id>
<content type='text'>
Add a new message type SYMBOLIC_PERMS under the 'Permissions'
subsection. Octal permission bits are easier to read and understand
instead of their symbolic macro names.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Acked-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904082330.14864-1-utkarshverma294@gmail.com
[jc: Tweaked wording as suggested by Dwaipayan Ray]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new message type SYMBOLIC_PERMS under the 'Permissions'
subsection. Octal permission bits are easier to read and understand
instead of their symbolic macro names.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Acked-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904082330.14864-1-utkarshverma294@gmail.com
[jc: Tweaked wording as suggested by Dwaipayan Ray]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Documentation: checkpatch: Add TRAILING_SEMICOLON message</title>
<updated>2021-09-14T21:07:49+00:00</updated>
<author>
<name>Utkarsh Verma</name>
<email>utkarshverma294@gmail.com</email>
</author>
<published>2021-09-04T07:42:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=29bd0cace2351eeccf325e36756aa55aa939bd11'/>
<id>29bd0cace2351eeccf325e36756aa55aa939bd11</id>
<content type='text'>
Add a new message type TRAILING_SEMICOLON for the macro definitions
that conclude with a semicolon.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904074201.13532-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new message type TRAILING_SEMICOLON for the macro definitions
that conclude with a semicolon.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904074201.13532-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Documentation: checkpatch: Add SPLIT_STRING message</title>
<updated>2021-09-14T21:07:26+00:00</updated>
<author>
<name>Utkarsh Verma</name>
<email>utkarshverma294@gmail.com</email>
</author>
<published>2021-09-04T07:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=d9548979f7aee0cbff4b407e8fce4af6b6d3cab0'/>
<id>d9548979f7aee0cbff4b407e8fce4af6b6d3cab0</id>
<content type='text'>
Add a new message type SPLIT_STRING under the 'Indentation and Line
Breaks' subsection. Checkpatch documentation for the splitting of
quoted strings that appear in userspace, across multiple lines.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904073621.12987-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new message type SPLIT_STRING under the 'Indentation and Line
Breaks' subsection. Checkpatch documentation for the splitting of
quoted strings that appear in userspace, across multiple lines.

Suggested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Utkarsh Verma &lt;utkarshverma294@gmail.com&gt;
Link: https://lore.kernel.org/r/20210904073621.12987-1-utkarshverma294@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: checkpatch: Document and segregate more checkpatch message types</title>
<updated>2021-06-14T21:37:12+00:00</updated>
<author>
<name>Dwaipayan Ray</name>
<email>dwaipayanray1@gmail.com</email>
</author>
<published>2021-06-14T14:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=91a1265cacdd96229304adddf18dcf64a4b8c040'/>
<id>91a1265cacdd96229304adddf18dcf64a4b8c040</id>
<content type='text'>
Add and document more checkpatch message types. About 50% of all
message types are documented now.

In addition to this:

- Create a new subsection 'Indentation and Line Breaks'.
- Rename subsection 'Comment style' to simply 'Comments'.
- Refactor some of the existing types to appropriate subsections.

Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Tested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Link: https://lore.kernel.org/r/20210614141132.6881-1-dwaipayanray1@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add and document more checkpatch message types. About 50% of all
message types are documented now.

In addition to this:

- Create a new subsection 'Indentation and Line Breaks'.
- Rename subsection 'Comment style' to simply 'Comments'.
- Refactor some of the existing types to appropriate subsections.

Reviewed-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Tested-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Link: https://lore.kernel.org/r/20210614141132.6881-1-dwaipayanray1@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
