<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/Documentation/process/coding-style.rst, branch v7.2-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-01T18:48:20+00:00</updated>
<entry>
<title>Documentation: Fix syntax of kmalloc_objs example in coding style doc</title>
<updated>2026-06-01T18:48:20+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>ukleinek@kernel.org</email>
</author>
<published>2026-05-29T08:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=323fa4b9608b1c277ca7f97f81172aa56da76074'/>
<id>urn:sha1:323fa4b9608b1c277ca7f97f81172aa56da76074</id>
<content type='text'>
The first parameter should match the variable that the allocated memory
is assigned to. Fix the example accordingly, the one for kmalloc_obj got
it right already.

Fixes: 7c6d969d5349 ("Documentation: adopt new coding style of type-aware kmalloc-family")
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260529081006.2019687-2-ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>Documentation: adopt new coding style of type-aware kmalloc-family</title>
<updated>2026-05-03T14:54:21+00:00</updated>
<author>
<name>Manuel Ebner</name>
<email>manuelebner@mailbox.org</email>
</author>
<published>2026-04-29T07:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c6d969d5349c40348276d5c301b2d200afa623d'/>
<id>urn:sha1:7c6d969d5349c40348276d5c301b2d200afa623d</id>
<content type='text'>
Update the documentation to reflect new type-aware kmalloc-family as
suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj()
and family")

ptr = kmalloc(sizeof(*ptr), gfp);
 -&gt; ptr = kmalloc_obj(*ptr, gfp);
ptr = kmalloc(sizeof(struct some_obj_name), gfp);
 -&gt; ptr = kmalloc_obj(*ptr, gfp);
ptr = kzalloc(sizeof(*ptr), gfp);
 -&gt; ptr = kzalloc_obj(*ptr, gfp);
ptr = kmalloc_array(count, sizeof(*ptr), gfp);
 -&gt; ptr = kmalloc_objs(*ptr, count, gfp);
ptr = kcalloc(count, sizeof(*ptr), gfp);
 -&gt; ptr = kzalloc_objs(*ptr, count, gfp);

Signed-off-by: Manuel Ebner &lt;manuelebner@mailbox.org&gt;
Acked-by: SeongJae Park &lt;sj@kernel.org&gt;
Acked-by: Vlastimil Babka (SUSE) &lt;vbabka@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260429071445.309733-2-manuelebner@mailbox.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc: move kernel-doc to tools/docs</title>
<updated>2026-01-20T22:31:06+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2026-01-19T12:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eba6ffd126cd52358181ed5a179644a161f9c65f'/>
<id>urn:sha1:eba6ffd126cd52358181ed5a179644a161f9c65f</id>
<content type='text'>
kernel-doc is the last documentation-related tool still living outside of
the tools/docs directory; the time has come to move it over.

[mchehab: fixed kdoc lib location]

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;311d17e403524349940a8b12de6b5e91e554b1f4.1768823489.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: Update documentation to avoid mentioning of kernel.h</title>
<updated>2025-12-22T21:59:18+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2025-11-26T21:46:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=197bbebd25810c5218e3347d61641be8e49c5404'/>
<id>urn:sha1:197bbebd25810c5218e3347d61641be8e49c5404</id>
<content type='text'>
For several years, and still ongoing, the kernel.h is being split
to smaller and narrow headers to avoid "including everything" approach
which is bad in many ways. Since that, documentation missed a few
required updates to align with that work. Do it here.

Note, language translations are left untouched and if anybody willing
to help, please provide path(es) based on the updated English variant.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20251126214709.2322314-1-andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>coding-style: fix verb typo</title>
<updated>2025-11-03T23:11:24+00:00</updated>
<author>
<name>Gabriele Ricciardi</name>
<email>gricciardi-coding@pm.me</email>
</author>
<published>2025-11-01T22:31:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c62e2e874d151d56842fbfd29c3ffaf4e83dba4'/>
<id>urn:sha1:2c62e2e874d151d56842fbfd29c3ffaf4e83dba4</id>
<content type='text'>
In the Identation section there is a list of instructions in
second-person. The offending line uses third-person singular.

Signed-off-by: Gabriele Ricciardi &lt;gricciardi-coding@pm.me&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20251101223027.171874-1-gricciardi-coding@pm.me&gt;
</content>
</entry>
<entry>
<title>docs: process: discourage pointless boilerplate kdoc</title>
<updated>2025-06-21T20:14:33+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-06-14T20:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5880f95a97928308845dc97fdd239605e06e501'/>
<id>urn:sha1:e5880f95a97928308845dc97fdd239605e06e501</id>
<content type='text'>
It appears that folks "less versed in kernel coding" think that its
good style to document every function, even if they have no useful
information to pass to the future readers of the code. This used
to be just a waste of space, but with increased kdoc format linting
it's also a burden when refactoring the code.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Joe Damato &lt;joe@dama.to&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20250614204258.61449-1-kuba@kernel.org
</content>
</entry>
<entry>
<title>docs/process: fix typos</title>
<updated>2024-09-10T21:16:28+00:00</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-09-07T12:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5d436f05a3f45053cfc820ae140899b916c6e00'/>
<id>urn:sha1:c5d436f05a3f45053cfc820ae140899b916c6e00</id>
<content type='text'>
Fix typos in documentation.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20240907122534.15998-1-algonell@gmail.com&gt;
</content>
</entry>
<entry>
<title>net: drop special comment style</title>
<updated>2024-08-23T09:21:02+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2024-08-19T09:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82b8000c28b56b014ce52a1f1581bef4af148681'/>
<id>urn:sha1:82b8000c28b56b014ce52a1f1581bef4af148681</id>
<content type='text'>
As we discussed in the room at netdevconf earlier this week,
drop the requirement for special comment style for netdev.

For checkpatch, the general check accepts both right now, so
simply drop the special request there as well.

Acked-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Docs: Move clang-format from process/ to dev-tools/</title>
<updated>2024-06-26T22:36:00+00:00</updated>
<author>
<name>SeongJae Park</name>
<email>sj@kernel.org</email>
</author>
<published>2024-06-24T18:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3b10a02ca2fe1e27ee008e9fcd8cf7076f7f776'/>
<id>urn:sha1:e3b10a02ca2fe1e27ee008e9fcd8cf7076f7f776</id>
<content type='text'>
'clang-format' is on 'Other material' section of 'process/index', but it
may fit more under 'dev-tools/' directory.  Move it.

Signed-off-by: SeongJae Park &lt;sj@kernel.org&gt;
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Acked-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20240624185312.94537-5-sj@kernel.org
</content>
</entry>
<entry>
<title>Documentation: coding-style: ask function-like macros to evaluate parameters</title>
<updated>2024-05-11T22:51:44+00:00</updated>
<author>
<name>Barry Song</name>
<email>v-songbaohua@oppo.com</email>
</author>
<published>2024-05-07T03:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6813216bbdba18e182759d949589be95ebef290f'/>
<id>urn:sha1:6813216bbdba18e182759d949589be95ebef290f</id>
<content type='text'>
Patch series "codingstyle: avoid unused parameters for a function-like
macro", v7.

A function-like macro could result in build warnings such as "unused
variable." This patchset updates the guidance to recommend always using a
static inline function instead and also provides checkpatch support for
this new rule.


This patch (of 2):

Recent commit 77292bb8ca69c80 ("crypto: scomp - remove memcpy if
sg_nents is 1 and pages are lowmem") leads to warnings on xtensa
and loongarch,
   In file included from crypto/scompress.c:12:
   include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone':
   include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable]
      76 |                 struct page *page;
         |                              ^~~~
   crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
&gt;&gt; crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable]
     174 |                         struct page *dst_page = sg_page(req-&gt;dst);
         |

The reason is that flush_dcache_page() is implemented as a noop
macro on these platforms as below,

 #define flush_dcache_page(page) do { } while (0)

The driver code, for itself, seems be quite innocent and placing
maybe_unused seems pointless,

 struct page *dst_page = sg_page(req-&gt;dst);

 for (i = 0; i &lt; nr_pages; i++)
 	flush_dcache_page(dst_page + i);

And it should be independent of architectural implementation
differences.

Let's provide guidance on coding style for requesting parameter
evaluation or proposing the migration to a static inline
function.

Link: https://lkml.kernel.org/r/20240507032757.146386-1-21cnbao@gmail.com
Link: https://lkml.kernel.org/r/20240507032757.146386-2-21cnbao@gmail.com
Signed-off-by: Barry Song &lt;v-songbaohua@oppo.com&gt;
Suggested-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&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: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Dwaipayan Ray &lt;dwaipayanray1@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Cc: Xining Xu &lt;mac.xxn@outlook.com&gt;
Cc: Charlemagne Lasse &lt;charlemagnelasse@gmail.com&gt;
Cc: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
