panfrost: Drop redundant NULL check
[mesa.git] / src / gallium / drivers / vc4 / vc4_bufmgr.c
index 5ec360934c071692952faa5d5032b70b96d769bc..a786e8ee939ad354320a01b1243f233d26f3ee07 100644 (file)
 #include "vc4_context.h"
 #include "vc4_screen.h"
 
-#ifdef HAVE_VALGRIND
-#include <valgrind.h>
-#include <memcheck.h>
-#define VG(x) x
-#else
-#define VG(x)
-#endif
-
 static bool dump_stats = false;
 
 static void
@@ -108,7 +100,7 @@ vc4_bo_dump_stats(struct vc4_screen *screen)
                 struct timespec time;
                 clock_gettime(CLOCK_MONOTONIC, &time);
                 fprintf(stderr, "  now:               %ld\n",
-                        time.tv_sec);
+                        (long)time.tv_sec);
         }
 }
 
@@ -413,7 +405,7 @@ vc4_bo_open_handle(struct vc4_screen *screen,
         bo->map = malloc(bo->size);
 #endif
 
-        util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);
+        _mesa_hash_table_insert(screen->bo_handles, (void *)(uintptr_t)handle, bo);
 
 done:
         mtx_unlock(&screen->bo_handles_mutex);
@@ -471,7 +463,7 @@ vc4_bo_get_dmabuf(struct vc4_bo *bo)
 
         mtx_lock(&bo->screen->bo_handles_mutex);
         bo->private = false;
-        util_hash_table_set(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
+        _mesa_hash_table_insert(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
         mtx_unlock(&bo->screen->bo_handles_mutex);
 
         return fd;