Skip to contentSkip to conversation

mtd: dataflash: Use ULL suffix for 64-bit constants

PATCH Applied Geert Uytterhoeven 2 participants 2 messages Jun 22, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtd: dataflash: Use ULL suffix for 64-bit constants

With gcc 4.1.2 when compiling for 32-bit:

drivers/mtd/devices/mtd_dataflash.c:736: warning: integer constant is too large for ‘long’ type drivers/mtd/devices/mtd_dataflash.c:737: warning: integer constant is too large for ‘long’ type

Add the missing "ULL" suffixes to fix this.

Fixes 67e4145ebf2c161d ("mtd: dataflash: Add flash_info for AT45DB641E")

---
v2:
- Add Acked-by.

---
 drivers/mtd/devices/mtd_dataflash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/devices/mtd_dataflash.c +2 -2
index 3a6f450d1093c4c5..53febe8a68c3cdfa 100644
@@ -733,8 +733,8 @@ static struct flash_info dataflash_data[] = {
 	{ "AT45DB642x",  0x1f2800, 8192, 1056, 11, SUP_POW2PS},
 	{ "at45db642d",  0x1f2800, 8192, 1024, 10, SUP_POW2PS | IS_POW2PS},
 
-	{ "AT45DB641E",  0x1f28000100, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
-	{ "at45db641e",  0x1f28000100, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
+	{ "AT45DB641E",  0x1f28000100ULL, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
+	{ "at45db641e",  0x1f28000100ULL, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
 };
 
 static struct flash_info *jedec_lookup(struct spi_device *spi,
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · On Fri, 22 Jun 2018 09:04:25 +0200 Geert Uytterhoeven <[email protected]>…

With gcc 4.1.2 when compiling for 32-bit:

drivers/mtd/devices/mtd_dataflash.c:736: warning: integer constant is too large for ‘long’ type drivers/mtd/devices/mtd_dataflash.c:737: warning: integer constant is too large for ‘long’ type

Add the missing "ULL" suffixes to fix this.

Fixes 67e4145ebf2c161d ("mtd: dataflash: Add flash_info for AT45DB641E")

Applied.

Thanks,

Boris

Quoted 22 lines

---
v2:
- Add Acked-by.

---
 drivers/mtd/devices/mtd_dataflash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/devices/mtd_dataflash.c +2 -2
index 3a6f450d1093c4c5..53febe8a68c3cdfa 100644
@@ -733,8 +733,8 @@ static struct flash_info dataflash_data[] = {
 	{ "AT45DB642x",  0x1f2800, 8192, 1056, 11, SUP_POW2PS},
 	{ "at45db642d",  0x1f2800, 8192, 1024, 10, SUP_POW2PS | IS_POW2PS},
 
-	{ "AT45DB641E",  0x1f28000100, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
-	{ "at45db641e",  0x1f28000100, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
+	{ "AT45DB641E",  0x1f28000100ULL, 32768, 264, 9, SUP_EXTID | SUP_POW2PS},
+	{ "at45db641e",  0x1f28000100ULL, 32768, 256, 8, SUP_EXTID | SUP_POW2PS | IS_POW2PS},
 };
 
 static struct flash_info *jedec_lookup(struct spi_device *spi,