Re: [PATCH v5 12/12] mellanox: switch to virtio_legacy_init/size

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

 



On Tue, Apr 7, 2020 at 12:35 AM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
>
> These are used for legacy ring format, switch to APIs that make this
> explicit.
>

Acked-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> ---
>
> maintainers, pls ack merging this through virtio tree due to dependency
> on previous patches in the patchset.

Here you are!

>
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
> index 5739a9669b29..f42b1fb713f1 100644
> --- a/drivers/platform/mellanox/mlxbf-tmfifo.c
> +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
> @@ -214,7 +214,7 @@ static void mlxbf_tmfifo_free_vrings(struct mlxbf_tmfifo *fifo,
>         for (i = 0; i < ARRAY_SIZE(tm_vdev->vrings); i++) {
>                 vring = &tm_vdev->vrings[i];
>                 if (vring->va) {
> -                       size = vring_size(vring->num, vring->align);
> +                       size = vring_legacy_size(vring->num, vring->align);
>                         dma_free_coherent(tm_vdev->vdev.dev.parent, size,
>                                           vring->va, vring->dma);
>                         vring->va = NULL;
> @@ -245,7 +245,7 @@ static int mlxbf_tmfifo_alloc_vrings(struct mlxbf_tmfifo *fifo,
>                 vring->vdev_id = tm_vdev->vdev.id.device;
>                 dev = &tm_vdev->vdev.dev;
>
> -               size = vring_size(vring->num, vring->align);
> +               size = vring_legacy_size(vring->num, vring->align);
>                 va = dma_alloc_coherent(dev->parent, size, &dma, GFP_KERNEL);
>                 if (!va) {
>                         mlxbf_tmfifo_free_vrings(fifo, tm_vdev);
> @@ -935,7 +935,7 @@ static int mlxbf_tmfifo_virtio_find_vqs(struct virtio_device *vdev,
>                 vring = &tm_vdev->vrings[i];
>
>                 /* zero vring */
> -               size = vring_size(vring->num, vring->align);
> +               size = vring_legacy_size(vring->num, vring->align);
>                 memset(vring->va, 0, size);
>                 vq = vring_new_virtqueue(i, vring->num, vring->align, vdev,
>                                          false, false, vring->va,
> --
> MST
>


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux