From df8b6b33518952d1e7bd12b718c9c552e99bd2e7 Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 8 Feb 2018 07:48:19 +0000 Subject: [PATCH] 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. --- sys/dev/nand/nand_bbt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nand/nand_bbt.c b/sys/dev/nand/nand_bbt.c index c6015168dc11..0e3479c178f5 100644 --- a/sys/dev/nand/nand_bbt.c +++ b/sys/dev/nand/nand_bbt.c @@ -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 -__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 #include @@ -208,7 +208,7 @@ nand_bbt_block_mark(device_t self, flash_off_t block, uint8_t marker) __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 */