[PATCH 07/10] drm/gem: Switch to __nonnull_args() macro
Thomas Zimmermann
tzimmermann at suse.de
Thu Oct 29 00:32:41 PDT 2026
Hi
Am 28.10.26 um 09:19 schrieb Dmitry Ilvokhin:
> 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.
>
> Suggested-by: Miguel Ojeda <miguel.ojeda.sandonis at gmail.com>
> Signed-off-by: Dmitry Ilvokhin <d at ilvokhin.com>
Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
Should gem.h now include <linux/compiler_attributes.h> ?
Best regards
Thomas
> ---
> include/drm/drm_gem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
> index ed329408acbe..56dd15921c7a 100644
> --- a/include/drm/drm_gem.h
> +++ b/include/drm/drm_gem.h
> @@ -566,7 +566,7 @@ static inline void drm_gem_object_get(struct drm_gem_object *obj)
> kref_get(&obj->refcount);
> }
>
> -__attribute__((nonnull))
> +__nonnull_args()
> static inline void
> __drm_gem_object_put(struct drm_gem_object *obj)
> {
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
More information about the linux-arm-kernel
mailing list