* [PATCH] mtd: dataflash: Use ULL suffix for 64-bit constants
@ 2017-07-15 7:59 Geert Uytterhoeven
2017-07-27 0:34 ` Andrey Smirnov
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2017-07-15 7:59 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, Andrey Smirnov
Cc: linux-mtd, linux-kernel, Geert Uytterhoeven
With gcc 4.1.2:
drivers/mtd/devices/mtd_dataflash.c:740: warning: integer constant is too large for ‘long’ type
drivers/mtd/devices/mtd_dataflash.c:741: warning: integer constant is too large for ‘long’ type
Add the missing "ULL" suffix to fix this.
Fixes: 67e4145ebf2c161d ("mtd: dataflash: Add flash_info for AT45DB641E")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/mtd/devices/mtd_dataflash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 5dc8bd042cc54b2d..504e34f295180fd9 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -737,8 +737,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,
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mtd: dataflash: Use ULL suffix for 64-bit constants
2017-07-15 7:59 [PATCH] mtd: dataflash: Use ULL suffix for 64-bit constants Geert Uytterhoeven
@ 2017-07-27 0:34 ` Andrey Smirnov
0 siblings, 0 replies; 2+ messages in thread
From: Andrey Smirnov @ 2017-07-27 0:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, linux-mtd, linux-kernel
On Sat, Jul 15, 2017 at 12:59 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> With gcc 4.1.2:
>
> drivers/mtd/devices/mtd_dataflash.c:740: warning: integer constant is too large for ‘long’ type
> drivers/mtd/devices/mtd_dataflash.c:741: warning: integer constant is too large for ‘long’ type
>
> Add the missing "ULL" suffix to fix this.
>
> Fixes: 67e4145ebf2c161d ("mtd: dataflash: Add flash_info for AT45DB641E")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
My bad, sorry about that. FWIW,
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> drivers/mtd/devices/mtd_dataflash.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
> index 5dc8bd042cc54b2d..504e34f295180fd9 100644
> --- a/drivers/mtd/devices/mtd_dataflash.c
> +++ b/drivers/mtd/devices/mtd_dataflash.c
> @@ -737,8 +737,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,
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-27 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 7:59 [PATCH] mtd: dataflash: Use ULL suffix for 64-bit constants Geert Uytterhoeven
2017-07-27 0:34 ` Andrey Smirnov
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®