venus: Fix error log on PPC

On the ppc64le architecture error log fail to compile with error:

    ../src/virtio/vulkan/vn_renderer_virtgpu.c: In function ‘virtgpu_ioctl_map’:
    ../src/virtio/vulkan/vn_renderer_virtgpu.c:751:66: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=]
    751 |          "mmap failed: gpu_fd=%d, handle=%u, size=%zu, offset=%llu, err=%s",
        |                                                               ~~~^
        |                                                                  |
        |                                                                  long long unsigned int
        |                                                               %lu
    752 |          gpu->fd, gem_handle, size, args.offset, strerror(errno));
        |                                     ~~~~~~~~~~~
        |                                         |
        |                                         __u64 {aka long unsigned int}
    cc1: some warnings being treated as errors

Parse the parameters to fix the failure.

Fixes: a49b7adad8 ("venus: add error log coverage for virtgpu backend")
(cherry picked from commit dd3fe2d671)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
This commit is contained in:
José Expósito 2026-02-09 10:02:18 +01:00 committed by Marge Bot
parent ee5075f221
commit ede2a1ce84
2 changed files with 2 additions and 2 deletions

View file

@ -794,7 +794,7 @@
"description": "venus: Fix error log on PPC",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "a49b7adad883148f07308fd4d8c1e57796302857",
"notes": null

View file

@ -749,7 +749,7 @@ virtgpu_ioctl_map(struct virtgpu *gpu,
vn_log(
gpu->instance,
"mmap failed: gpu_fd=%d, handle=%u, size=%zu, offset=%llu, err=%s",
gpu->fd, gem_handle, size, args.offset, strerror(errno));
gpu->fd, gem_handle, size, (long long)args.offset, strerror(errno));
return NULL;
}