Skip to contentSkip to conversation

mtd: rawnand: brcmnand: fix sparse warnings

PATCH Applied William Zhang 2 participants 2 messages Feb 27, 2024 – Mar 7, 2024

Subsystems (4)
lore
Share & tools
lore

William Zhang

author maintainer
#0 lore raw

PATCH 1/1 mtd: rawnand: brcmnand: fix sparse warnings

Fix the following sparse warnings:
sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:79:41: sparse: sparse:

cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression

Fixes c52c16d1bee5 ("mtd: rawnand: brcmnand: Add BCMBCA read data bus interface")

---

 drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c +2 -2
index 7ad3e7a98f97..ea534850b97a 100644
@@ -76,8 +76,8 @@ static void bcmbca_read_data_bus(struct brcmnand_soc *soc,
 	 * and dest address, which is incompatible with nand cache. Fallback
 	 * to the memcpy_fromio in such case
 	 */
-	if (bcmbca_nand_is_buf_aligned((void *)flash_cache, buffer))
-		memcpy((void *)buffer, (void *)flash_cache, fc_words * 4);
+	if (bcmbca_nand_is_buf_aligned((void __force *)flash_cache, buffer))
+		memcpy((void *)buffer, (void __force *)flash_cache, fc_words * 4);
 	else
 		memcpy_fromio((void *)buffer, flash_cache, fc_words * 4);
 }
Signature · 1 line
2.37.3
maintainer Applied
#1 lore raw
Quoted 11 lines · William Zhang

Fix the following sparse warnings:
sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:79:41: sparse: sparse:

cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression

Quoted 4 lines
Fixes c52c16d1bee5 ("mtd: rawnand: brcmnand: Add BCMBCA read data bus interface")

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel