Module Name:    src
Committed By:   jmcneill
Date:           Thu Nov  9 21:45:24 UTC 2017

Modified Files:
        src/sys/dev/nand: nand_samsung.c

Log Message:
ul is not 64-bit on all platforms, use ull when calculating planesize


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/nand/nand_samsung.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/nand/nand_samsung.c
diff -u src/sys/dev/nand/nand_samsung.c:1.9 src/sys/dev/nand/nand_samsung.c:1.10
--- src/sys/dev/nand/nand_samsung.c:1.9	Sat Nov  3 12:12:48 2012
+++ src/sys/dev/nand/nand_samsung.c	Thu Nov  9 21:45:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand_samsung.c,v 1.9 2012/11/03 12:12:48 ahoka Exp $	*/
+/*	$NetBSD: nand_samsung.c,v 1.10 2017/11/09 21:45:24 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nand_samsung.c,v 1.9 2012/11/03 12:12:48 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nand_samsung.c,v 1.10 2017/11/09 21:45:24 jmcneill Exp $");
 
 #include "nand.h"
 #include "onfi.h"
@@ -181,13 +181,13 @@ nand_read_parameters_samsung(device_t se
 			planesize = 1024 * 1024 * 1024 / 8;
 			break;
 		case 0x5:
-			planesize = 2ul * 1024 * 1024 * 1024 / 8;
+			planesize = 2ull * 1024 * 1024 * 1024 / 8;
 			break;
 		case 0x6:
-			planesize = 4ul * 1024 * 1024 * 1024 / 8;
+			planesize = 4ull * 1024 * 1024 * 1024 / 8;
 			break;
 		case 0x7:
-			planesize = 8ul * 1024 * 1024 * 1024 / 8;
+			planesize = 8ull * 1024 * 1024 * 1024 / 8;
 			break;
 		default:
 			KASSERTMSG(false, "ID Data parsing bug detected!");

Reply via email to