u_gralloc: Remove usage of NONNULL macro
authorRoman Stratiienko <r.stratiienko@gmail.com>
Wed, 20 Sep 2023 21:01:19 +0000 (00:01 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 21 Sep 2023 10:50:34 +0000 (10:50 +0000)
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 <r.stratiienko@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25256>

src/util/u_gralloc/u_gralloc.c
src/util/u_gralloc/u_gralloc.h

index 2452df6..f070453 100644 (file)
@@ -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;
index 596e3a3..e1b04e5 100644 (file)
@@ -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
 }