Re: [PATCH v1 1/1] docs: Update documentation to avoid mentioning of kernel.h

Randy Dunlap
2025-11-26T21:18:31Z

On 11/26/25 12:59 PM, Andy Shevchenko wrote:
> 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 <andriy.shevchenko@linux.intel.com>
> ---
> Documentation/core-api/kobject.rst | 2 +-
> Documentation/dev-tools/checkpatch.rst | 2 +-
> Documentation/driver-api/basics.rst | 17 ++++++++++++++++-
> .../driver-api/driver-model/design-patterns.rst | 2 +-
> Documentation/process/coding-style.rst | 10 +++++++---
> Documentation/staging/rpmsg.rst | 7 +++++--
> 6 files changed, 31 insertions(+), 9 deletions(-)
>

> diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
> index 2969ca378dbb..d63ea0bffdfe 100644
> --- a/Documentation/process/coding-style.rst
> +++ b/Documentation/process/coding-style.rst
> @@ -1070,7 +1070,7 @@ readability.
> 18) Don't re-invent the kernel macros
> -------------------------------------
>
> -The header file include/linux/kernel.h contains a number of macros that
> +There many header files in include/linux/ that contain a number of macros that

There are many

> you should use, rather than explicitly coding some variant of them yourself.
> For example, if you need to calculate the length of an array, take advantage
> of the macro

Otherwise LGTM. Thanks.

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

--
~Randy