Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271805
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv2] ASoC: samsung: pass DMA channels as pointers |
| Date | 2015-11-18 02:40 +0100 |
| Message-ID | <qvZT3-4sK-5@gated-at.bofh.it> (permalink) |
| References | <qvQPL-6YM-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv2] ASoC: samsung: pass DMA channels as pointers Arnd Bergmann <arnd@arndb.de> - 2015-11-17 17:00 +0100 Re: [PATCHv2] ASoC: samsung: pass DMA channels as pointers Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-11-18 02:40 +0100
csiph-web