Re: [PATCH] virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

2022-09-15 Thread Dan Carpenter
On Thu, Sep 15, 2022 at 05:45:46PM -0700, Chia-I Wu wrote: > On Thu, Sep 15, 2022 at 4:14 AM Dan Carpenter > wrote: > > > > 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

Re: [PATCH] virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

2022-09-15 Thread Chia-I Wu
On Thu, Sep 15, 2022 at 4:14 AM Dan Carpenter wrote: > > 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

[PATCH] virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

2022-09-15 Thread Dan Carpenter
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: cd7f5ca33585 ("drm/virtio: implement context in