[PATCH 00/10] treewide: switch to __nonnull_args() macro

Randy Dunlap rdunlap at infradead.org
Wed Oct 28 13:44:59 PDT 2026



On 10/28/26 1:19 AM, Dmitry Ilvokhin wrote:
> Commit 22302af28d3f ("cleanup: Annotate guard constructors with
> nonnull") added the __nonnull_args() macro to wrap the raw compiler
> attribute, keeping the attribute's quirks in one place rather than
> open-coded at every call site.
> 
> This series replaces the remaining open-coded __attribute__((nonnull))
> users with __nonnull_args() to standardize nonnull attribute usage
> across the tree.
> 
> Each patch can be applied separately by the respective maintainers. The
> only dependency is kernel-doc: the string and lib/list_sort patches need
> patch 1 ("docs: xforms_lists: support __nonnull_args()") in the same
> release, otherwise strends() and list_sort() drop out of the generated
> documentation.
> 
> Latest Sparse release could not properly parse __nonnull_args() without
> arguments. Fix was proposed [1] and merged, but until updated version of
> Sparse will reach wide masses it might trip on __nonnull_args() without
> arguments.
> 
> There are few more instances of __attribute__((nonnull)) usages left in
> the tools subdirectory, they are perf related copied files and can
> (should?) be updated separately after this patchset lands.
> 
> Build-tested allmodconfig with GCC 11.5.0 and clang 22.1.8.

What ARCH(es)?

Did you mean to use such an "old" version of GCC?

thanks.

> 
> [1]: https://lore.kernel.org/all/20261019175633.415493-19-bvanassche@acm.org/
> 
> Dmitry Ilvokhin (10):
>   docs: xforms_lists: support __nonnull_args()
>   string: Switch to __nonnull_args() macro
>   lib/list_sort: Switch to __nonnull_args() macro
>   xarray: switch to __nonnull_args() macro
>   drm/i915: switch to __nonnull_args() macro
>   drm/amdgpu: switch to __nonnull_args() macro
>   drm/gem: Switch to __nonnull_args() macro
>   leds: pwm: Switch to __nonnull_args() macro
>   soc: aspeed: lpc-snoop: Switch to __nonnull_args() macro
>   checkpatch: suggest nonnull attribute conversion
> 
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 2 +-
>  drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 ++--
>  drivers/gpu/drm/i915/i915_request.h        | 4 ++--
>  drivers/leds/leds-pwm.c                    | 2 +-
>  drivers/soc/aspeed/aspeed-lpc-snoop.c      | 4 ++--
>  include/drm/drm_gem.h                      | 2 +-
>  include/linux/list_sort.h                  | 4 ++--
>  include/linux/string.h                     | 2 +-
>  include/linux/xarray.h                     | 4 ++--
>  lib/list_sort.c                            | 6 +++---
>  scripts/checkpatch.pl                      | 3 +++
>  tools/include/linux/compiler.h             | 4 ++++
>  tools/lib/python/kdoc/xforms_lists.py      | 1 +
>  13 files changed, 25 insertions(+), 17 deletions(-)
> 
> 
> base-commit: 6b4b543fa18757297ac756a6fe6e64f506b7844a

-- 
~Randy




More information about the linux-arm-kernel mailing list