mtd: nand: Use ULL-suffix for big u64 constant

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Oct 15 23:59:04 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=bd8898db3e03147d9d7ddd48876fb3f3bcbab6c1
Commit:     bd8898db3e03147d9d7ddd48876fb3f3bcbab6c1
Parent:     ff0a215438cf7be0a652cb3457f562539bd40b22
Author:     Geert Uytterhoeven <geert at linux-m68k.org>
AuthorDate: Sat Aug 9 19:07:53 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Aug 19 11:53:09 2014 -0700

    mtd: nand: Use ULL-suffix for big u64 constant
    
    drivers/mtd/nand/nand_timings.c:45: warning: integer constant is too large for ‘long’ type
    
    [ Editorial note: This is a false warning. Looking at ISO draft N1124
        (this is approximately C11, the first PDF I had lying around),
        section 6.4.4.1 (statement 5):
    
           "The type of an integer constant is the first of the
            corresponding list in which its value can be represented."
    
        So this should not be an overflow, and any toolchain that says so
        (e.g., GCC 4.4) is buggy.
    
           -Brian ]
    
    Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/nand_timings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
index 8b36253..e81470a 100644
--- a/drivers/mtd/nand/nand_timings.c
+++ b/drivers/mtd/nand/nand_timings.c
@@ -42,7 +42,7 @@ static const struct nand_sdr_timings onfi_sdr_timings[] = {
 		.tRHZ_max = 200000,
 		.tRLOH_min = 0,
 		.tRP_min = 50000,
-		.tRST_max = 250000000000,
+		.tRST_max = 250000000000ULL,
 		.tWB_max = 200000,
 		.tRR_min = 40000,
 		.tWC_min = 100000,



More information about the linux-mtd-cvs mailing list