Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: xilinx_dma: fix mixed_enum_type coverity warning

Typecast the fls(width -1) with (enum dmaengine_alignment) in
xilinx_dma_chan_probe function to fix the coverity warning.

Addresses-Coverity: Event mixed_enum_type.
Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1608722462-29519-4-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Shravya Kumbham and committed by
Vinod Koul
2d5efea6 faeb0731

+1 -1
+1 -1
drivers/dma/xilinx/xilinx_dma.c
··· 2781 2781 has_dre = false; 2782 2782 2783 2783 if (!has_dre) 2784 - xdev->common.copy_align = fls(width - 1); 2784 + xdev->common.copy_align = (enum dmaengine_alignment)fls(width - 1); 2785 2785 2786 2786 if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") || 2787 2787 of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||