Skip to content

Commit 90a6c03

Browse files
Li Zetaovinodkoul
authored andcommitted
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>
1 parent a1cb2ff commit 90a6c03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/xilinx/xdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static int xdma_probe(struct platform_device *pdev)
883883
goto failed;
884884
}
885885
xdev->irq_start = res->start;
886-
xdev->irq_num = res->end - res->start + 1;
886+
xdev->irq_num = resource_size(res);
887887

888888
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
889889
if (!res) {

0 commit comments

Comments
 (0)