All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning
@ 2019-12-14 21:09 ` Vasyl Gomonovych
  0 siblings, 0 replies; 12+ messages in thread
From: Vasyl Gomonovych @ 2019-12-14 21:09 UTC (permalink / raw)
  To: piotrs, miquel.raynal, richard, vigneshr
  Cc: Vasyl Gomonovych, linux-mtd, linux-kernel

Use a cast to uintptr_t and next to a pointer
In the final assignment the same casting in place
memory_pointer = (uintptr_t)mem_ptr;
Fix warning: cast to pointer from integer of different size

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
This commit fixes a minor issue with a warning
Not sure if we will have problem here in case of
dma_addr_t which can be 64-bit wide on 32-bit arch

---
 drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 3a36285a8d8a..960c3a0be69c 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -1280,8 +1280,8 @@ cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr,
 	}
 
 	cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page,
-				       (void *)dma_buf, (void *)dma_ctrl_dat,
-				       ctype);
+				       (void *)(uintptr_t)dma_buf,
+				       (void *)(uintptr_t)dma_ctrl_dat, ctype);
 
 	status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
 
-- 
2.17.1


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

end of thread, other threads:[~2020-01-09 19:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 21:09 [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning Vasyl Gomonovych
2019-12-14 21:09 ` Vasyl Gomonovych
2019-12-16 10:09 ` Miquel Raynal
2019-12-16 10:09   ` Miquel Raynal
2019-12-18  9:57   ` [PATCH v2] mtd: " Vasyl Gomonovych
2019-12-18  9:57     ` Vasyl Gomonovych
2020-01-06 21:18     ` Olof Johansson
2020-01-06 21:18       ` Olof Johansson
2020-01-07  9:04       ` Miquel Raynal
2020-01-07  9:04         ` Miquel Raynal
2020-01-09 19:15     ` Miquel Raynal
2020-01-09 19:15       ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.