Module Name: src
Committed By: mrg
Date: Thu Feb 8 07:48:19 UTC 2018
Modified Files:
src/sys/dev/nand: nand_bbt.c
Log Message:
update for GCC 6:
- nand_bbt_block_mark() has a left-shift of negative value issue.
this change avoids it, but reviewers indicate this function has
other problems.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nand/nand_bbt.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_bbt.c
diff -u src/sys/dev/nand/nand_bbt.c:1.7 src/sys/dev/nand/nand_bbt.c:1.8
--- src/sys/dev/nand/nand_bbt.c:1.7 Tue Oct 22 01:01:27 2013
+++ src/sys/dev/nand/nand_bbt.c Thu Feb 8 07:48:19 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: nand_bbt.c,v 1.7 2013/10/22 01:01:27 htodd Exp $ */
+/* $NetBSD: nand_bbt.c,v 1.8 2018/02/08 07:48:19 mrg Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nand_bbt.c,v 1.7 2013/10/22 01:01:27 htodd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nand_bbt.c,v 1.8 2018/02/08 07:48:19 mrg Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -208,7 +208,7 @@ nand_bbt_block_mark(device_t self, flash
__USE(chip);
KASSERT(block < chip->nc_size / chip->nc_block_size);
- clean = (~0x03 << ((block % 4) * 2));
+ clean = (0xfc << ((block % 4) * 2));
marker = (marker << ((block % 4) * 2));
/* set byte containing the 2 bit marker for this block */