From 4d0e1a40d8662cf0e2b00ef944ddf6dcef27f7f2 Mon Sep 17 00:00:00 2001
From: Kamal Heib <kheib@redhat.com>
Date: Fri, 8 Mar 2024 21:46:56 -0500
Subject: [PATCH] pyverbs: Fix build failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix the following error:
rdma-core-50.0/pyverbs/dmabuf_alloc.c: In function ‘drm_open’:
rdma-core-50.0/pyverbs/dmabuf_alloc.c:122:28: error: assignment to ‘int (*)(struct drm *, uint64_t, uint32_t *, int)’ {aka ‘int (*)(struct drm *, long long unsigned int, unsigned int *, int)’} from incompatible pointer type ‘int (*)(struct drm *, size_t, uint32_t *, int)’ {aka ‘int (*)(struct drm *, unsigned int, unsigned int *, int)’} [-Wincompatible-pointer-types]
122 | drm->alloc = amdgpu_alloc;
Signed-off-by: Kamal Heib <kheib@redhat.com>
---
pyverbs/dmabuf_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyverbs/dmabuf_alloc.c b/pyverbs/dmabuf_alloc.c
index e3ea0a44f3d5..68f25928a1b7 100644
--- a/pyverbs/dmabuf_alloc.c
+++ b/pyverbs/dmabuf_alloc.c
@@ -43,7 +43,7 @@ static int i915_alloc(struct drm *drm, uint64_t size, uint32_t *handle, int gtt)
return 0;
}
-static int amdgpu_alloc(struct drm *drm, size_t size, uint32_t *handle, int gtt)
+static int amdgpu_alloc(struct drm *drm, uint64_t size, uint32_t *handle, int gtt)
{
union drm_amdgpu_gem_create gem_create = {{}};
int err;
--
2.44.0