* [PATCH] mtd: rawnand: brcmnand: Fix sparse warnings in bcma_nand
@ 2022-01-25 22:52 Florian Fainelli
2022-01-26 10:52 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2022-01-25 22:52 UTC (permalink / raw)
To: linux-mtd
Cc: Florian Fainelli, kernel test robot, Brian Norris, Kamal Dasu,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
open list:BROADCOM STB NAND FLASH DRIVER, open list
sparse was unhappy about the way we woulc call cpu_to_be32/be32_to_cpu,
apply the appropriate casting to silence the warnings.
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZNHPJFYLO64EGI5QUT7HZ63J7O5J2G7N/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/mtd/nand/raw/brcmnand/bcma_nand.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/brcmnand/bcma_nand.c b/drivers/mtd/nand/raw/brcmnand/bcma_nand.c
index d7c62988c452..dd27977919fb 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcma_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcma_nand.c
@@ -58,7 +58,7 @@ static u32 brcmnand_bcma_read_reg(struct brcmnand_soc *soc, u32 offset)
/* Swap if necessary */
if (brcmnand_bcma_needs_swapping(offset))
- val = be32_to_cpu(val);
+ val = be32_to_cpu((__force __be32)val);
return val;
}
@@ -75,7 +75,7 @@ static void brcmnand_bcma_write_reg(struct brcmnand_soc *soc, u32 val,
/* Swap if necessary */
if (brcmnand_bcma_needs_swapping(offset))
- val = cpu_to_be32(val);
+ val = (__force u32)cpu_to_be32(val);
bcma_cc_write32(sc->cc, offset, val);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: rawnand: brcmnand: Fix sparse warnings in bcma_nand
2022-01-25 22:52 [PATCH] mtd: rawnand: brcmnand: Fix sparse warnings in bcma_nand Florian Fainelli
@ 2022-01-26 10:52 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2022-01-26 10:52 UTC (permalink / raw)
To: Florian Fainelli, linux-mtd
Cc: Miquel Raynal, kernel test robot, Brian Norris, Kamal Dasu,
Richard Weinberger, Vignesh Raghavendra,
open list:BROADCOM STB NAND FLASH DRIVER, open list
On Tue, 2022-01-25 at 22:52:43 UTC, Florian Fainelli wrote:
> sparse was unhappy about the way we woulc call cpu_to_be32/be32_to_cpu,
> apply the appropriate casting to silence the warnings.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZNHPJFYLO64EGI5QUT7HZ63J7O5J2G7N/
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-26 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 22:52 [PATCH] mtd: rawnand: brcmnand: Fix sparse warnings in bcma_nand Florian Fainelli
2022-01-26 10:52 ` 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).