Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f78cc16c authored by Shravya Kumbham's avatar Shravya Kumbham Committed by Greg Kroah-Hartman
Browse files

dmaengine: xilinx_dma: fix mixed_enum_type coverity warning



commit 2d5efea64472469117dc1a9a39530069e95b21e9 upstream.

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: 9cd4360d ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: default avatarShravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: default avatarRadhey 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: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ee2423f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2426,7 +2426,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
		has_dre = false;
		has_dre = false;


	if (!has_dre)
	if (!has_dre)
		xdev->common.copy_align = fls(width - 1);
		xdev->common.copy_align = (enum dmaengine_alignment)fls(width - 1);


	if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") ||
	if (of_device_is_compatible(node, "xlnx,axi-vdma-mm2s-channel") ||
	    of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||
	    of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||