[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1608228615-7413-3-git-send-email-radhey.shyam.pandey@xilinx.com>
Date: Thu, 17 Dec 2020 23:40:14 +0530
From: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
To: <vkoul@...nel.org>, <dan.j.williams@...el.com>,
<michal.simek@...inx.com>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<git@...inx.com>, Shravya Kumbham <shravya.kumbham@...inx.com>,
"Radhey Shyam Pandey" <radhey.shyam.pandey@...inx.com>
Subject: [PATCH 2/3] dmaengine: xilinx_dma: fix incompatible param warning in _child_probe()
From: Shravya Kumbham <shravya.kumbham@...inx.com>
In xilinx_dma_child_probe function, the nr_channels variable is
passed to of_property_read_u32() which expects an u32 return value
pointer. Modify the nr_channels variable type from int to u32 to
fix the incompatible parameter coverity warning.
Addresses-Coverity: Event incompatible_param.
Signed-off-by: Shravya Kumbham <shravya.kumbham@...inx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
---
drivers/dma/xilinx/xilinx_dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index e41435be5b79..cf75e2af6381 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2921,7 +2921,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
static int xilinx_dma_child_probe(struct xilinx_dma_device *xdev,
struct device_node *node)
{
- int ret, i, nr_channels = 1;
+ int ret, i;
+ u32 nr_channels = 1;
ret = of_property_read_u32(node, "dma-channels", &nr_channels);
if (xdev->dma_config->dmatype == XDMA_TYPE_AXIMCDMA && ret < 0)
--
2.7.4
Powered by blists - more mailing lists