mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akihiro TSUKADA <tskd08@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	mchehab@kernel.org, andy.shevchenko@gmail.com,
	kirill.shilimanov@huawei.com, novikov@ispras.ru
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: pt3: Use dma_set_mask_and_coherent() and simplify code
Date: Tue, 04 Jan 2022 00:59:38 +0900	[thread overview]
Message-ID: <a86506727555e6cd38681b94fcecf6b7fabf5bc8.camel@gmail.com> (raw)
In-Reply-To: <34f3a2b58d5f9078709b7d592536af0be49ea1d9.1641072450.git.christophe.jaillet@wanadoo.fr>

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/media/pci/pt3/pt3.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/media/pci/pt3/pt3.c
> b/drivers/media/pci/pt3/pt3.c
> index 0d51bdf01f43..11f26cac0abc 100644
> --- a/drivers/media/pci/pt3/pt3.c
> +++ b/drivers/media/pci/pt3/pt3.c
> @@ -707,18 +707,10 @@ static int pt3_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
>         if (ret < 0)
>                 return ret;
>  
> -       ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
> -       if (ret == 0)
> -               dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
> -       else {
> -               ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
> -               if (ret == 0)
> -                       dma_set_coherent_mask(&pdev->dev,
> DMA_BIT_MASK(32));
> -               else {
> -                       dev_err(&pdev->dev, "Failed to set DMA
> mask\n");
> -                       return ret;
> -               }
> -               dev_info(&pdev->dev, "Use 32bit DMA\n");
> +       ret = dma_set_mask_and_coherent(&pdev->dev,
> DMA_BIT_MASK(64));
> +       if (ret) {
> +               dev_err(&pdev->dev, "Failed to set DMA mask\n");
> +               return ret;
>         }
>  
>         pt3 = devm_kzalloc(&pdev->dev, sizeof(*pt3), GFP_KERNEL);

tested on x86_64.

Acked-by: Akihiro Tsukada <tskd08@gmail.com>

      reply	other threads:[~2022-01-03 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 21:28 Christophe JAILLET
2022-01-03 15:59 ` Akihiro TSUKADA [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=a86506727555e6cd38681b94fcecf6b7fabf5bc8.camel@gmail.com \
    --to=tskd08@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kirill.shilimanov@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=novikov@ispras.ru \
    /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

all inboxes | Powered by JetHome®