]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 19 Sep 2022 06:36:30 +0000 (09:36 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 23 Sep 2022 11:16:37 +0000 (13:16 +0200)
commite9323b4c37344a7579dbb0fbcb2a6bd055b773f3
treee5ae18f435448c714a15e539fedae6a73cbf27d8
parent3535f5f34b8ce8f9bf141871ef98604a1e56f6ff
virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

The ->ring_idx_mask variable is a u64 so static checkers, Smatch in
this case, complain if the BIT() is not also a u64.

drivers/gpu/drm/virtio/virtgpu_ioctl.c:50 virtio_gpu_fence_event_create()
warn: should '(1 << ring_idx)' be a 64 bit type?

Fixes: b079ac630e05 ("drm/virtio: implement context init: add virtio_gpu_fence_event")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/YygN7jY0GdUSQSy0@kili
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_ioctl.c