diff --git a/drivers/mtd/rammtd.c b/drivers/mtd/rammtd.c index c4c422cd61..c50db6a3ad 100644 --- a/drivers/mtd/rammtd.c +++ b/drivers/mtd/rammtd.c @@ -317,7 +317,7 @@ static int ram_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) { case MTDIOC_GEOMETRY: { - FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)arg; + FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg); if (geo) { /* Populate the geometry structure with information need to know @@ -334,7 +334,7 @@ static int ram_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) case MTDIOC_XIPBASE: { - FAR void **ppv = (FAR void**)arg; + FAR void **ppv = (FAR void**)((uintptr_t)arg); if (ppv) { /* Return (void*) base address of device memory */ diff --git a/drivers/mtd/ramtron.c b/drivers/mtd/ramtron.c index 5739b3b05f..f1149df6dd 100755 --- a/drivers/mtd/ramtron.c +++ b/drivers/mtd/ramtron.c @@ -160,7 +160,7 @@ struct ramtron_dev_s static struct ramtron_parts_s ramtron_parts[] = { { - .size = 32*1024, + .size = 32L*1024L, .addr_len = 2, .id1 = 0x22, .id2 = 0x00, @@ -168,7 +168,7 @@ static struct ramtron_parts_s ramtron_parts[] = .name = "FM25V02", }, { - .size = 32*1024, + .size = 32L*1024L, .addr_len = 2, .id1 = 0x22, .id2 = 0x01, @@ -176,7 +176,7 @@ static struct ramtron_parts_s ramtron_parts[] = .name = "FM25VN02", }, { - .size = 64*1024, + .size = 64L*1024L, .addr_len = 2, .id1 = 0x23, .id2 = 0x00, @@ -184,7 +184,7 @@ static struct ramtron_parts_s ramtron_parts[] = .name = "FM25V05", }, { - .size = 64*1024, + .size = 64L*1024L, .addr_len = 2, .id1 = 0x23, .id2 = 0x01, @@ -192,7 +192,7 @@ static struct ramtron_parts_s ramtron_parts[] = .name = "FM25VN05", }, { - .size = 128*1024, + .size = 128L*1024L, .addr_len = 3, .id1 = 0x24, .id2 = 0x00, @@ -200,7 +200,7 @@ static struct ramtron_parts_s ramtron_parts[] = .name = "FM25V10", }, { - .size = 128*1024, + .size = 128L*1024L, .addr_len = 3, .id1 = 0x24, .id2 = 0x01, @@ -209,7 +209,7 @@ static struct ramtron_parts_s ramtron_parts[] = }, #ifdef CONFIG_RAMTRON_FRAM_NON_JEDEC { - .size = 256*1024, + .size = 256L*1024L, .addr_len = 3, .id1 = 0xff, .id2 = 0xff,