From 3b6f14c4d36b943b7d462b0f8246834b3cb650ad Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Thu, 21 Sep 2023 00:01:19 +0300 Subject: [PATCH] u_gralloc: Remove usage of NONNULL macro We agreed in [1] not to use it since it has little value, but making a code less readable. [1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25256 Signed-off-by: Roman Stratiienko Reviewed-by: Yiwei Zhang Reviewed-by: Eric Engestrom Part-of: --- src/util/u_gralloc/u_gralloc.c | 20 +++++++++----------- src/util/u_gralloc/u_gralloc.h | 18 +++++++++--------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/util/u_gralloc/u_gralloc.c b/src/util/u_gralloc/u_gralloc.c index 2452df63998..f070453daaf 100644 --- a/src/util/u_gralloc/u_gralloc.c +++ b/src/util/u_gralloc/u_gralloc.c @@ -72,7 +72,7 @@ out: } void -u_gralloc_destroy(struct u_gralloc **gralloc NONNULL) +u_gralloc_destroy(struct u_gralloc **gralloc) { int i; @@ -101,10 +101,9 @@ u_gralloc_destroy(struct u_gralloc **gralloc NONNULL) } int -u_gralloc_get_buffer_basic_info(struct u_gralloc *gralloc NONNULL, - struct u_gralloc_buffer_handle *hnd NONNULL, - struct u_gralloc_buffer_basic_info *out - NONNULL) +u_gralloc_get_buffer_basic_info(struct u_gralloc *gralloc, + struct u_gralloc_buffer_handle *hnd, + struct u_gralloc_buffer_basic_info *out) { struct u_gralloc_buffer_basic_info info = {0}; int ret; @@ -120,10 +119,9 @@ u_gralloc_get_buffer_basic_info(struct u_gralloc *gralloc NONNULL, } int -u_gralloc_get_buffer_color_info(struct u_gralloc *gralloc NONNULL, - struct u_gralloc_buffer_handle *hnd NONNULL, - struct u_gralloc_buffer_color_info *out - NONNULL) +u_gralloc_get_buffer_color_info(struct u_gralloc *gralloc, + struct u_gralloc_buffer_handle *hnd, + struct u_gralloc_buffer_color_info *out) { struct u_gralloc_buffer_color_info info = {0}; int ret; @@ -142,8 +140,8 @@ u_gralloc_get_buffer_color_info(struct u_gralloc *gralloc NONNULL, } int -u_gralloc_get_front_rendering_usage(struct u_gralloc *gralloc NONNULL, - uint64_t *out_usage NONNULL) +u_gralloc_get_front_rendering_usage(struct u_gralloc *gralloc, + uint64_t *out_usage) { if (!gralloc->ops.get_front_rendering_usage) return -ENOTSUP; diff --git a/src/util/u_gralloc/u_gralloc.h b/src/util/u_gralloc/u_gralloc.h index 596e3a31230..e1b04e5a2fa 100644 --- a/src/util/u_gralloc/u_gralloc.h +++ b/src/util/u_gralloc/u_gralloc.h @@ -59,20 +59,20 @@ enum u_gralloc_type { struct u_gralloc *u_gralloc_create(enum u_gralloc_type type); -void u_gralloc_destroy(struct u_gralloc **gralloc NONNULL); +void u_gralloc_destroy(struct u_gralloc **gralloc); int u_gralloc_get_buffer_basic_info( - struct u_gralloc *gralloc NONNULL, - struct u_gralloc_buffer_handle *hnd NONNULL, - struct u_gralloc_buffer_basic_info *out NONNULL); + struct u_gralloc *gralloc, + struct u_gralloc_buffer_handle *hnd, + struct u_gralloc_buffer_basic_info *out); int u_gralloc_get_buffer_color_info( - struct u_gralloc *gralloc NONNULL, - struct u_gralloc_buffer_handle *hnd NONNULL, - struct u_gralloc_buffer_color_info *out NONNULL); + struct u_gralloc *gralloc, + struct u_gralloc_buffer_handle *hnd, + struct u_gralloc_buffer_color_info *out); -int u_gralloc_get_front_rendering_usage(struct u_gralloc *gralloc NONNULL, - uint64_t *out_usage NONNULL); +int u_gralloc_get_front_rendering_usage(struct u_gralloc *gralloc, + uint64_t *out_usage); #ifdef __cplusplus }