summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorLi Zetao <lizetao1@huawei.com>2023-08-03 06:32:35 +0300
committerVinod Koul <vkoul@kernel.org>2023-10-04 16:57:51 +0300
commit90a6c030f506585f484a9804aafe29cb42b93697 (patch)
tree9c94b12e9a25669a797d0fb73499cb9161376803 /drivers/dma
parenta1cb2ffe5fe59b0f5612e5e9148c5311c32f311c (diff)
downloadlinux-90a6c030f506585f484a9804aafe29cb42b93697.tar.xz
dmaengine: xilinx: xdma: Use resource_size() in xdma_probe()
There is a warning reported by coccinelle: ./drivers/dma/xilinx/xdma.c:888:22-25: ERROR: Missing resource_size with res Use resource_size() on resource object instead of explicit computation. Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230803033235.3049137-1-lizetao1@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/xilinx/xdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 459e7b9838ed..78a8eef5dcf7 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -883,7 +883,7 @@ static int xdma_probe(struct platform_device *pdev)
goto failed;
}
xdev->irq_start = res->start;
- xdev->irq_num = res->end - res->start + 1;
+ xdev->irq_num = resource_size(res);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {