linux-stable/drivers/mtd
Roger Quadros 695261477e mtd: rawnand: omap_elm: Fix incorrect type in assignment
[ Upstream commit d8403b9eee ]

Once the ECC word endianness is converted to BE32, we force cast it
to u32 so we can use elm_write_reg() which in turn uses writel().

Fixes below sparse warnings:

   drivers/mtd/nand/raw/omap_elm.c:180:37: sparse:     expected unsigned int [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:180:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:185:37: sparse:     expected unsigned int [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:185:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:190:37: sparse:     expected unsigned int [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:190:37: sparse:     got restricted __be32 [usertype]
>> drivers/mtd/nand/raw/omap_elm.c:200:40: sparse: sparse: restricted __be32 degrades to integer
   drivers/mtd/nand/raw/omap_elm.c:206:39: sparse: sparse: restricted __be32 degrades to integer
   drivers/mtd/nand/raw/omap_elm.c:210:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:210:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:213:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:213:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:216:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:216:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:219:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:219:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:222:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:222:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:225:37: sparse:     expected unsigned int [assigned] [usertype] val
   drivers/mtd/nand/raw/omap_elm.c:225:37: sparse:     got restricted __be32 [usertype]
   drivers/mtd/nand/raw/omap_elm.c:228:39: sparse: sparse: restricted __be32 degrades to integer

Fixes: bf22433575 ("mtd: devices: elm: Add support for ELM error correction")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306212211.WDXokuWh-lkp@intel.com/
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230624184021.7740-1-rogerq@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:39 +02:00
..
chips mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N 2022-06-14 16:59:39 +02:00
devices mtd: devices: docg3: check the return value of devm_ioremap() in the probe 2022-10-26 13:19:31 +02:00
lpddr mtd: lpddr2_nvm: Fix possible null-ptr-deref 2023-01-18 11:30:12 +01:00
maps mtd: maps: pxa2xx-flash: fix memory leak in probe 2023-01-18 11:30:12 +01:00
nand mtd: rawnand: omap_elm: Fix incorrect type in assignment 2023-08-11 11:45:39 +02:00
parsers
spi-nor spi: cadence-quadspi: fix suspend-resume implementations 2023-05-17 11:13:17 +02:00
tests
ubi treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c mtd: parser: cmdline: Fix parsing of part-names with colons 2020-12-30 11:26:15 +01:00
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c block: genhd: add 'groups' argument to device_add_disk 2021-03-11 14:04:59 +01:00
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:04:40 +02:00
mtdblock_ro.c
mtdchar.c mtd: require write permissions for locking and badblock ioctls 2021-05-22 10:59:29 +02:00
mtdconcat.c
mtdcore.c mtd: Fix device name leak when register device failed in add_mtd_device() 2023-01-18 11:30:10 +01:00
mtdcore.h
mtdoops.c mtd: mtdoops: Don't write panic data twice 2020-10-29 09:55:17 +01:00
mtdpart.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release 2022-08-25 11:15:14 +02:00
sm_ftl.h
ssfdc.c