Re: [PATCH] virtio_ring: Drop unnecessary initialization of detach_buf_packed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 26, 2022 at 7:15 PM Deming Wang <wangdeming@xxxxxxxxxx> wrote:
>
> The variable is initialized but it is only used after its assignment.
>
> Signed-off-by: Deming Wang <wangdeming@xxxxxxxxxx>

Acked-by: Jason Wang <jasowang@xxxxxxxxxx>

> ---
>  drivers/virtio/virtio_ring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 8974c34b40fd..abac0a3de440 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -1544,7 +1544,7 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq)
>  static void detach_buf_packed(struct vring_virtqueue *vq,
>                               unsigned int id, void **ctx)
>  {
> -       struct vring_desc_state_packed *state = NULL;
> +       struct vring_desc_state_packed *state;
>         struct vring_packed_desc *desc;
>         unsigned int i, curr;
>
> --
> 2.27.0
>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux