[Linux-stm32] [PATCH RFC 3/6] dmaengine: qcom: gpi: Accept protocol ID hints
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Tue Aug 5 22:08:06 UTC 2025
On Wed, Jul 30, 2025 at 01:32:58PM +0200, Geert Uytterhoeven wrote:
> On Wed, 30 Jul 2025 at 11:35, Konrad Dybcio <konradybcio at kernel.org> wrote:
...
> > + /* The protocol ID is in the teens range, simply ignore the higher bits */
> > + gchan->protocol = (u32)((u64)proto);
>
> A single cast "(uintptr_t)" should be sufficient.
FWIW, this means (unsigned long) as Torvalds is quite against uintptr_t in the kernel.
> Casing the pointer to u64 on 32-bit may trigger:
>
> warning: cast from pointer to integer of different size
> [-Wpointer-to-int-cast]
>
> > return dma_get_slave_channel(&gchan->vc.chan);
> > }
--
With Best Regards,
Andy Shevchenko
More information about the Linux-stm32
mailing list