diff mbox series

[-next] dmaengine: xilinx: xdma: Use resource_size() in xdma_probe()

Message ID 20230803033235.3049137-1-lizetao1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] dmaengine: xilinx: xdma: Use resource_size() in xdma_probe() | expand

Commit Message

Li Zetao Aug. 3, 2023, 3:32 a.m. UTC
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>
---
 drivers/dma/xilinx/xdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul Oct. 4, 2023, 2:29 p.m. UTC | #1
On Thu, 03 Aug 2023 11:32:35 +0800, Li Zetao wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] dmaengine: xilinx: xdma: Use resource_size() in xdma_probe()
      commit: 90a6c030f506585f484a9804aafe29cb42b93697

Best regards,
diff mbox series

Patch

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index e0bfd129d563..da5410dddfbf 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -885,7 +885,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) {