lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240227190258.200929-1-william.zhang@broadcom.com>
Date: Tue, 27 Feb 2024 11:02:57 -0800
From: William Zhang <william.zhang@...adcom.com>
To: Linux MTD List <linux-mtd@...ts.infradead.org>,
	Linux ARM List <linux-arm-kernel@...ts.infradead.org>,
	Broadcom Kernel List <bcm-kernel-feedback-list@...adcom.com>
Cc: f.fainelli@...il.com,
	kursad.oney@...adcom.com,
	joel.peshkin@...adcom.com,
	miquel.raynal@...tlin.com,
	anand.gore@...adcom.com,
	dregan@...l.com,
	kamal.dasu@...adcom.com,
	tomer.yacoby@...adcom.com,
	dan.beygelman@...adcom.com,
	William Zhang <william.zhang@...adcom.com>,
	kernel test robot <lkp@...el.com>,
	linux-kernel@...r.kernel.org,
	Vignesh Raghavendra <vigneshr@...com>,
	Brian Norris <computersforpeace@...il.com>,
	Richard Weinberger <richard@....at>,
	Rafał Miłecki <rafal@...ecki.pl>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	David Regan <dregan@...adcom.com>
Subject: [PATCH] mtd: rawnand: brcmnand: fix sparse warnings

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@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402270940.gmVLVRg0-lkp@intel.com/
Signed-off-by: William Zhang <william.zhang@...adcom.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ