Re: [PATCH] mmc: sh_mmcif: Silence DMA slave ID compile warnings on 64-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd,

On Sat, Aug 15, 2015 at 10:26 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> > How about changing the type of the slave_id_rx/slave_id_tx fields
>> > to void*? That way, the hack can be moved to arch/sh/boards/board-sh7757lcr.c,
>> > which is now the only file passing data this way. Ideally, we'd also
>> > pass the shdma_chan_filter function pointer in pdata to avoid the link
>> > time dependency on a particular dmaengine driver.
>>
>> That's actually more tricky, as a NULL filter function means something
>> completely different, and causes funny failures if the DTS lacks "dmas"
>> properties, cfr. "dmaengine: shdma: Make dummy shdma_chan_filter() always
>> return false".
>> https://git.kernel.org/cgit/linux/kernel/git/vkoul/slave-dma.git/commit/?h=next&id=056f6c87028544de934f27caf95aa1545d585767
>
> Ah, this is nasty, I had not thought of that case. This makes the entire
> dma_request_slave_channel_compat() interface (which I never liked, fwiw)
> dangerous to use, because a lot of other drivers will get the filter
> function pointer from pdata already (any driver that works with more
> than one dmaengine master has to).
>
> I wonder if we should enforce this in __dma_request_slave_channel_compat()
> by checking both the fn and fn_param arguments to ensure they are not
> NULL before calling the legacy fallback using __dma_request_channel.

Thanks, that seems to work fine. Will send a patch...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux