mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: dw: fixed missing resource_size
@ 2020-11-23  7:02 Tian Tao
  2020-11-25 12:14 ` Serge Semin
  2020-11-25 13:58 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Tian Tao @ 2020-11-23  7:02 UTC (permalink / raw)
  To: fancer.lancer, broonie, linux-spi, linux-kernel

fixed the coccicheck:
drivers/spi/spi-dw-bt1.c:220:27-30: ERROR: Missing
resource_size with mem.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/spi/spi-dw-bt1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c
index f382dfad..da4f4d8 100644
--- a/drivers/spi/spi-dw-bt1.c
+++ b/drivers/spi/spi-dw-bt1.c
@@ -217,7 +217,7 @@ static int dw_spi_bt1_sys_init(struct platform_device *pdev,
 	if (mem) {
 		dwsbt1->map = devm_ioremap_resource(&pdev->dev, mem);
 		if (!IS_ERR(dwsbt1->map)) {
-			dwsbt1->map_len = (mem->end - mem->start + 1);
+			dwsbt1->map_len = resource_size(mem);
 			dws->mem_ops.dirmap_create = dw_spi_bt1_dirmap_create;
 			dws->mem_ops.dirmap_read = dw_spi_bt1_dirmap_read;
 		} else {
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-25 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23  7:02 [PATCH] spi: dw: fixed missing resource_size Tian Tao
2020-11-25 12:14 ` Serge Semin
2020-11-25 13:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®