mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-scsi@vger.kernel.org, linux-serial@vger.kernel.org,
	netdev@vger.kernel.org, linux-metag@vger.kernel.org,
	nios2-dev@lists.rocketboards.org, linux-fbdev@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH 04/11] sound/hal2: switch to dma_alloc_attrs
Date: Fri, 16 Jun 2017 10:49:56 +0200	[thread overview]
Message-ID: <s5h1sqkb9l7.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170616071716.17321-5-hch@lst.de>

On Fri, 16 Jun 2017 09:17:09 +0200,
Christoph Hellwig wrote:
> 
> Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Should I take this one through sound git tree, or would you prefer
taking all through another?

In the latter case,
  Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
>  sound/mips/hal2.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
> index 00fc9241d266..17a78a93e885 100644
> --- a/sound/mips/hal2.c
> +++ b/sound/mips/hal2.c
> @@ -461,15 +461,15 @@ static int hal2_alloc_dmabuf(struct hal2_codec *codec)
>  	int count = H2_BUF_SIZE / H2_BLOCK_SIZE;
>  	int i;
>  
> -	codec->buffer = dma_alloc_noncoherent(NULL, H2_BUF_SIZE,
> -					      &buffer_dma, GFP_KERNEL);
> +	codec->buffer = dma_alloc_attrs(NULL, H2_BUF_SIZE, &buffer_dma,
> +					GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
>  	if (!codec->buffer)
>  		return -ENOMEM;
> -	desc = dma_alloc_noncoherent(NULL, count * sizeof(struct hal2_desc),
> -				     &desc_dma, GFP_KERNEL);
> +	desc = dma_alloc_attrs(NULL, count * sizeof(struct hal2_desc),
> +			       &desc_dma, GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
>  	if (!desc) {
> -		dma_free_noncoherent(NULL, H2_BUF_SIZE,
> -				     codec->buffer, buffer_dma);
> +		dma_free_attrs(NULL, H2_BUF_SIZE, codec->buffer, buffer_dma,
> +			       DMA_ATTR_NON_CONSISTENT);
>  		return -ENOMEM;
>  	}
>  	codec->buffer_dma = buffer_dma;
> @@ -490,10 +490,10 @@ static int hal2_alloc_dmabuf(struct hal2_codec *codec)
>  
>  static void hal2_free_dmabuf(struct hal2_codec *codec)
>  {
> -	dma_free_noncoherent(NULL, codec->desc_count * sizeof(struct hal2_desc),
> -			     codec->desc, codec->desc_dma);
> -	dma_free_noncoherent(NULL, H2_BUF_SIZE, codec->buffer,
> -			     codec->buffer_dma);
> +	dma_free_attrs(NULL, codec->desc_count * sizeof(struct hal2_desc),
> +		       codec->desc, codec->desc_dma, DMA_ATTR_NON_CONSISTENT);
> +	dma_free_attrs(NULL, H2_BUF_SIZE, codec->buffer, codec->buffer_dma,
> +		       DMA_ATTR_NON_CONSISTENT);
>  }
>  
>  static struct snd_pcm_hardware hal2_pcm_hw = {
> -- 
> 2.11.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

  reply	other threads:[~2017-06-16  8:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  7:17 remove dma_alloc_noncoherent Christoph Hellwig
2017-06-16  7:17 ` [PATCH 01/11] dma-mapping: remove dmam_free_noncoherent Christoph Hellwig
2017-06-26  7:07   ` Christoph Hellwig
2017-06-26 20:53     ` Tejun Heo
2017-06-16  7:17 ` [PATCH 02/11] dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs Christoph Hellwig
2017-06-26  7:07   ` Christoph Hellwig
2017-06-26 20:53     ` Tejun Heo
2017-06-16  7:17 ` [PATCH 03/11] au1100fb: remove a bogus dma_free_nonconsistent call Christoph Hellwig
     [not found]   ` <CGME20170619111507epcas5p47fd18b90a02d827da256ff4ebbda8089@epcas5p4.samsung.com>
2017-06-19 11:15     ` Bartlomiej Zolnierkiewicz
2017-06-20  9:10       ` Christoph Hellwig
     [not found]         ` <CGME20170620105805epcas1p4ea41a72356c35f2a16197b970939fb65@epcas1p4.samsung.com>
2017-06-20 10:58           ` Bartlomiej Zolnierkiewicz
2017-06-16  7:17 ` [PATCH 04/11] sound/hal2: switch to dma_alloc_attrs Christoph Hellwig
2017-06-16  8:49   ` Takashi Iwai [this message]
2017-06-16  8:51     ` [alsa-devel] " Christoph Hellwig
2017-06-16  8:57       ` Takashi Iwai
2017-06-16  7:17 ` [PATCH 05/11] serial/mpsc: " Christoph Hellwig
2017-06-16  7:17 ` [PATCH 06/11] sigwd93: " Christoph Hellwig
2017-06-26 18:20   ` Martin K. Petersen
2017-06-16  7:17 ` [PATCH 07/11] 53c700: " Christoph Hellwig
2017-06-26 18:21   ` Martin K. Petersen
2017-06-16  7:17 ` [PATCH 08/11] sgiseeq: " Christoph Hellwig
2017-06-16  7:17 ` [PATCH 09/11] au1000_eth: " Christoph Hellwig
2017-06-16  7:17 ` [PATCH 10/11] i825xx: switch to " Christoph Hellwig
2017-06-16  7:17 ` [PATCH 11/11] dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent Christoph Hellwig
2017-06-20 12:44 ` remove dma_alloc_noncoherent David Laight

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=s5h1sqkb9l7.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=hch@lst.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-metag@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nios2-dev@lists.rocketboards.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

all inboxes | Powered by JetHome®