Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3765670ybb; Mon, 6 Apr 2020 15:28:18 -0700 (PDT) X-Google-Smtp-Source: APiQypIWVF4FoTZtsHVJVPMDigAz+5pDpgOVXuvHLTPp/pWmbRt/XEo9iESj7ydjTiVOWgulae41 X-Received: by 2002:a05:6830:23a3:: with SMTP id m3mr19068863ots.265.1586212098679; Mon, 06 Apr 2020 15:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586212098; cv=none; d=google.com; s=arc-20160816; b=d0iF20gRQIc4yWgULUwWoMtwaFvm9NGBsd+drxE9FsPRZNMTDzCf0F3k/2pkHhwB6k 3fD28chYlwshOuRn0FedFvyBAQQSa+H/vw8aadH/InAFOgbfm/hF4kItAM1zYPeCNFnl FMat3g6SukJaDnXMVxyOqWTUc5h4NGEdY6xOtDH8HDgUfQ+Jv2Pry/5L38rv9JcLv6k5 7CFQHHdVO8MtHf/2ASSTLb25czMus5wJjWU5M1V1Fg3JKA9YcVdhrFTNn20/ptrvAamP sAjl+l/bNBxhsGKqKvkPpMPtJFSaXN+0aVJCDRksGhjBREnZ4cf2dUxDqZKfrmokPam9 u1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nS0LENPibu3BN8DvjYKOeyJ1JVPN+T87e7mUOYlbPgs=; b=i8oyC7epOHQ3bJMVKbRv2vSt9IxDkxObj0YoBIYpCFiBWdliwwX/nto19fXNJ8Dg7O ijh+a+PCDEfIPxTiJzqXAPUVWrtp9NsakyIKCzLUaMSB+SjLWNUA7SHkrllFfGoDjY02 9Joh7J380f0jTRBfFSiajp+SeWdufoql6fDQjLm9ildzRKKNNMlC7vKHQ+fdocvwezO+ AKj7YYJbOZqKlRs2gYll/Z6PNtGG+FVKE+uuZiLF9xl9Sj5fQb5k5LlJE7X+SqEa3OWl gikBYlRKwMT50iBzNm2zNymoWkBhDPkaLMaKXA6dQguijJFXuHAotANwKrmiUs8cyMDM T1WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gPJN2Uuy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si7452464oih.253.2020.04.06.15.28.06; Mon, 06 Apr 2020 15:28:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gPJN2Uuy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726651AbgDFW1I (ORCPT + 99 others); Mon, 6 Apr 2020 18:27:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26391 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726595AbgDFW07 (ORCPT ); Mon, 6 Apr 2020 18:26:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586212018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nS0LENPibu3BN8DvjYKOeyJ1JVPN+T87e7mUOYlbPgs=; b=gPJN2UuyawIQwYysGB4G+/XNbxgHX3QfAwWJ6L8dNdvo2lFyorKfcpsO3fD0sCgdIKnsw+ auvtoDu1BiWW4X8Ykl76arwbzAfu1d4ziGSytauKTTBga7gHSxPm/yyTVLfwXybnJp4j1r EHyxYz9uajjp7m1z999ZK4cK8FuYEIs= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-429-X2_8xaBmOzm9nIbem8WiZw-1; Mon, 06 Apr 2020 18:26:56 -0400 X-MC-Unique: X2_8xaBmOzm9nIbem8WiZw-1 Received: by mail-wm1-f70.google.com with SMTP id r8so177594wmn.1 for ; Mon, 06 Apr 2020 15:26:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nS0LENPibu3BN8DvjYKOeyJ1JVPN+T87e7mUOYlbPgs=; b=VEb+ra155nuXU611KQTaSZ3ODU9AsDYIzeBXcAvr9bzBcdiIrravtt79j/sB9JSn7U YDrDIyNuqx+ExKL/XVZhr/2brS9EJa6GTNygGPfvdHM8nFOxGUzHr8PHNv99cJgRngMK DLuqsn8a5nzF3gZjAx+aii2Ep/gYHdtQs8MEqksaxj+H4HvFckvdJWHH66OJircEahkT KgoW+zNpLolE+/EqLmqeUnIcxFI+vMxe2qb3uRZxwzCc27BhPr8AjNpB5HCPzDlOVP9M mJG/nN48SccZrb5vLbKrWuacNysZMPNJwHdJHlPqKf53uM3bSdw9IUt3CkuVtUpQ1R4S NU5Q== X-Gm-Message-State: AGi0PuYTjJy7AX99auXfIPfXTmE5S3J9ExGF9Q2Tcvxuotr0r77prCeT YiIk3Xc6Glu4P+6+rUyLycuzqxTzMLbjZBSS77+VhsOPspAX6ndckLu30Dr2eXaAzZ82FV4bHdL 3C81W9kUcViTXXKMV16HalyTf X-Received: by 2002:a5d:5688:: with SMTP id f8mr1451062wrv.245.1586212015143; Mon, 06 Apr 2020 15:26:55 -0700 (PDT) X-Received: by 2002:a5d:5688:: with SMTP id f8mr1451052wrv.245.1586212014946; Mon, 06 Apr 2020 15:26:54 -0700 (PDT) Received: from redhat.com (bzq-79-176-51-222.red.bezeqint.net. [79.176.51.222]) by smtp.gmail.com with ESMTPSA id p5sm2990935wrn.93.2020.04.06.15.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 15:26:54 -0700 (PDT) Date: Mon, 6 Apr 2020 18:26:53 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Andy Shevchenko , Darren Hart , Vadim Pasternak , platform-driver-x86@vger.kernel.org Subject: [PATCH v6 12/12] mellanox: switch to virtio_legacy_init/size Message-ID: <20200406222507.281867-13-mst@redhat.com> References: <20200406222507.281867-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200406222507.281867-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These are used for legacy ring format, switch to APIs that make this explicit. Acked-by: Andy Shevchenko Signed-off-by: Michael S. Tsirkin --- maintainers, pls ack merging this through virtio tree due to dependency on previous patches in the patchset. 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