summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2026-10-28 08:19:43 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-11-13 00:18:19 -0800
commit01af9aebca1e80c874ea8d0522674f50ed69bd6d (patch)
tree29c23ccfd4a9cef05870168caa2c68af2dd0521c /include
parent2e8390198695d93a43b2c2dd8a570c364c73a69b (diff)
downloadlinux-next-01af9aebca1e80c874ea8d0522674f50ed69bd6d.tar.gz
linux-next-01af9aebca1e80c874ea8d0522674f50ed69bd6d.zip
xarray: switch to __nonnull_args() macro
Commit 22302af28d3f ("cleanup: Annotate guard constructors with nonnull") added the macro __nonnull_args() to wrap raw compiler attribute. Replace __attribute__((nonnull)) with __nonnull_args() to standardize nonnull attribute usage across the tree and keep the attribute's quirks in one place rather than open-coded at every call site. tools/testing/shared/linux/xarray.h directly includes the kernel's include/linux/xarray.h, which now uses __nonnull_args(). The macro is not defined under tools/, breaking test builds. Define __nonnull_args() in tools/include/linux/compiler.h. Link: https://lore.kernel.org/e2660c4c9f5e6f97be2ef7bd3752d259bce77d81.1793027261.git.d@ilvokhin.com Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Suggested-by: Miguel Ojeda <ojeda@kernel.org> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: David Airlie <airlied@gmail.com> Cc: Simona Vetter <simona@ffwll.ch> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Tvrtko Ursulin <tursulin@ursulin.net> Cc: Lee Jones <lee@kernel.org> Cc: Pavel Machek <pavel@kernel.org> Cc: Joel Stanley <joel@jms.id.au> Cc: Andrew Jeffery <andrew@codeconstruct.com.au> Cc: Ryan Chen <ryan_chen@aspeedtech.com> Cc: Billy Tsai <billy_tsai@aspeedtech.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Kees Cook <kees@kernel.org> Cc: Andy Shevchenko <andy@kernel.org> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Shuah Khan <skhan@linuxfoundation.org> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Andi Shyti <andi.shyti@kernel.org> Cc: Andi Shyti <andi.shyti@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/xarray.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index be850174e802..cf7f8802da5b 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -361,9 +361,9 @@ bool xa_get_mark(struct xarray *, unsigned long index, xa_mark_t);
void xa_set_mark(struct xarray *, unsigned long index, xa_mark_t);
void xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t);
void *xa_find(struct xarray *xa, unsigned long *index,
- unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
+ unsigned long max, xa_mark_t) __nonnull_args(2);
void *xa_find_after(struct xarray *xa, unsigned long *index,
- unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
+ unsigned long max, xa_mark_t) __nonnull_args(2);
unsigned int xa_extract(struct xarray *, void **dst, unsigned long start,
unsigned long max, unsigned int n, xa_mark_t);
void xa_destroy(struct xarray *);