alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org
Cc: linux-samsung-soc@vger.kernel.org,
	Heiko Stuebner <heiko@sntech.de>,
	Sangbeom Kim <sbkim73@samsung.com>,
	linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
	Vinod Koul <vinod.koul@intel.com>, Kukjin Kim <kgene@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv2] ASoC: samsung: pass DMA channels as pointers
Date: Wed, 18 Nov 2015 10:33:41 +0900	[thread overview]
Message-ID: <564BD575.3070702@samsung.com> (raw)
In-Reply-To: <6346833.MfUC71I3uD@wuerfel>

On 18.11.2015 00:53, Arnd Bergmann wrote:
> ARM64 allmodconfig produces a bunch of warnings when building the
> samsung ASoC code:
> 
> sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data':
> sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    playback_data->filter_data = (void *)playback->channel;
> sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    capture_data->filter_data = (void *)capture->channel;
> 
> We could easily shut up the warning by adding an intermediate cast,
> but there is a bigger underlying problem: The use of IORESOURCE_DMA
> to pass data from platform code to device drivers is dubious to start
> with, as what we really want is a pointer that can be passed into
> a filter function.
> 
> Note that on s3c64xx, the pl08x DMA data is already a pointer, but
> gets cast to resource_size_t so we can pass it as a resource, and it
> then gets converted back to a pointer. In contrast, the data we pass
> for s3c24xx is an index into a device specific table, and we artificially
> convert that into a pointer for the filter function.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2:
> 
> - no longer clash with SPI patch
> - don't reference platform data that might be NULL
> 

Looks good:

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

  parent reply	other threads:[~2015-11-18  1:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 15:53 [PATCHv2] ASoC: samsung: pass DMA channels as pointers Arnd Bergmann
2015-11-17 15:54 ` [PATCHv2 2/3] ASoC: s3c24xx-i2s: pass DMA channels as platform data Arnd Bergmann
2015-11-18  1:53   ` Krzysztof Kozlowski
2015-11-18 13:20   ` Arnd Bergmann
2015-11-18 13:29     ` [PATCH v3 " Arnd Bergmann
2015-11-18 18:09       ` Applied "ASoC: s3c24xx-i2s: pass DMA channels as platform data" to the asoc tree Mark Brown
2015-11-17 15:55 ` [PATCHv2 3/3] ASoC: samsung: pass filter function as pointer Arnd Bergmann
2015-11-18  2:13   ` Krzysztof Kozlowski
2015-11-18  9:31     ` Arnd Bergmann
2015-11-18  1:33 ` Krzysztof Kozlowski [this message]
2015-11-18 18:09 ` Applied "ASoC: samsung: pass DMA channels as pointers" to the asoc tree Mark Brown

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=564BD575.3070702@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=kgene@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sbkim73@samsung.com \
    --cc=vinod.koul@intel.com \
    /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).