Skip to content

Commit

Permalink
mtd: rawnand: brcmnand: Fix sparse warnings in bcma_nand
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220125225243.15201-1-f.fainelli@gmail.com
  • Loading branch information
Florian Fainelli authored and Miquel Raynal committed Jan 26, 2022
1 parent 2212c19 commit d430e4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nand/raw/brcmnand/bcma_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}
Expand Down

0 comments on commit d430e4a

Please sign in to comment.