linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: brcmnand: fix sparse warnings
@ 2024-02-27 19:02 William Zhang
  2024-03-07 17:28 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: William Zhang @ 2024-02-27 19:02 UTC (permalink / raw)
  To: Linux MTD List, Linux ARM List, Broadcom Kernel List
  Cc: f.fainelli, kursad.oney, joel.peshkin, miquel.raynal, anand.gore,
	dregan, kamal.dasu, tomer.yacoby, dan.beygelman, William Zhang,
	kernel test robot, linux-kernel, Vignesh Raghavendra,
	Brian Norris, Richard Weinberger, Rafał Miłecki,
	Florian Fainelli, David Regan

Fix the following sparse warnings:
sparse warnings: (new ones prefixed by >>)
>> 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")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402270940.gmVLVRg0-lkp@intel.com/
Signed-off-by: William Zhang <william.zhang@broadcom.com>

---

 drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c b/drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c
index 7ad3e7a98f97..ea534850b97a 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c
@@ -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);
 }
-- 
2.37.3


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: brcmnand: fix sparse warnings
  2024-02-27 19:02 [PATCH] mtd: rawnand: brcmnand: fix sparse warnings William Zhang
@ 2024-03-07 17:28 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-03-07 17:28 UTC (permalink / raw)
  To: William Zhang, Linux MTD List, Linux ARM List,
	Broadcom Kernel List
  Cc: Miquel Raynal, f.fainelli, kursad.oney, joel.peshkin, anand.gore,
	dregan, kamal.dasu, tomer.yacoby, dan.beygelman,
	kernel test robot, linux-kernel, Vignesh Raghavendra,
	Brian Norris, Richard Weinberger, Rafał Miłecki,
	Florian Fainelli, David Regan

On Tue, 2024-02-27 at 19:02:57 UTC, William Zhang wrote:
> Fix the following sparse warnings:
> sparse warnings: (new ones prefixed by >>)
> >> 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")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202402270940.gmVLVRg0-lkp@intel.com/
> Signed-off-by: William Zhang <william.zhang@broadcom.com>

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

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-07 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 19:02 [PATCH] mtd: rawnand: brcmnand: fix sparse warnings William Zhang
2024-03-07 17:28 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).