From 071106ecf68c401173c58808b1cf5f68cc50d390 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 05 Jan 2024 08:39:27 +0000
Subject: [PATCH] change wifi driver to cypress
---
kernel/drivers/mtd/nand/bbt.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/drivers/mtd/nand/bbt.c b/kernel/drivers/mtd/nand/bbt.c
index 64af689..7bf7278 100644
--- a/kernel/drivers/mtd/nand/bbt.c
+++ b/kernel/drivers/mtd/nand/bbt.c
@@ -116,7 +116,10 @@
if (entry >= nanddev_neraseblocks(nand))
return -ERANGE;
- pos[0] &= ~GENMASK(offs + bits_per_block - 1, offs);
+ if (bits_per_block + offs > BITS_PER_LONG)
+ pos[0] &= ~GENMASK(BITS_PER_LONG - 1, offs);
+ else
+ pos[0] &= ~GENMASK(offs + bits_per_block - 1, offs);
pos[0] |= val << offs;
if (bits_per_block + offs > BITS_PER_LONG) {
--
Gitblit v1.6.2