summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@kernel.org>2022-02-02 13:21:29 +0200
committerPraneeth Bajjuri <praneeth@ti.com>2022-02-02 16:22:01 -0600
commit77be322324f44010e3ed1d21c8c805b1b8912c6d (patch)
treef5a679fc3718b5d553f25be19f7a7155caa225eb /drivers/mtd
parentafb06c74c1cd0a1c169317aef7c520be043e0898 (diff)
mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms
Pointer size cannot be assumed to be 32-bit, so use use uintptr_t instead of uint32_t. Fixes the below build warning on 64-bit builds. drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] head = ((uint32_t) buf) % 4; Signed-off-by: Roger Quadros <rogerq@kernel.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/omap_gpmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 97fd5690f5..fd89451198 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -429,14 +429,14 @@ static inline void omap_nand_read(struct mtd_info *mtd, uint8_t *buf, int len)
static void omap_nand_read_prefetch(struct mtd_info *mtd, uint8_t *buf, int len)
{
int ret;
- uint32_t head, tail;
+ uintptr_t head, tail;
struct nand_chip *chip = mtd_to_nand(mtd);
/*
* If the destination buffer is unaligned, start with reading
* the overlap byte-wise.
*/
- head = ((uint32_t) buf) % 4;
+ head = ((uintptr_t)buf) % 4;
if (head) {
omap_nand_read(mtd, buf, head);
buf += head;