kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	mst@redhat.com, lingshan.zhu@intel.com, eli@mellanox.com,
	parav@mellanox.com
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] vdpa: ifcvf: Use dma_set_mask_and_coherent to simplify code
Date: Mon, 30 Nov 2020 02:20:34 +0000	[thread overview]
Message-ID: <4576b2bb-d4d3-6413-c2cb-54e7d781eebf@redhat.com> (raw)
In-Reply-To: <20201129125434.1462638-1-christophe.jaillet@wanadoo.fr>


On 2020/11/29 下午8:54, Christophe JAILLET wrote:
> 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
> an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.
>
> While at it, fix a typo (s/confiugration/configuration)
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---


Acked-by: Jason Wang <jasowang@redhat.com>


>   drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index 8b4028556cb6..fa1af301cf55 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -417,16 +417,9 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   		return ret;
>   	}
>   
> -	ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
> +	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
>   	if (ret) {
> -		IFCVF_ERR(pdev, "No usable DMA confiugration\n");
> -		return ret;
> -	}
> -
> -	ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
> -	if (ret) {
> -		IFCVF_ERR(pdev,
> -			  "No usable coherent DMA confiugration\n");
> +		IFCVF_ERR(pdev, "No usable DMA configuration\n");
>   		return ret;
>   	}
>   

      reply	other threads:[~2020-11-30  2:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 12:54 [PATCH] vdpa: ifcvf: Use dma_set_mask_and_coherent to simplify code Christophe JAILLET
2020-11-30  2:20 ` Jason Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4576b2bb-d4d3-6413-c2cb-54e7d781eebf@redhat.com \
    --to=jasowang@redhat.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=eli@mellanox.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=parav@mellanox.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).