linux/drivers/mtd/maps
Serge Semin 18b9c94037 mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning
sparse is unhappy with us casting the __iomem address space pointer to
a type with no address space attribute specified:

"sparse warnings: (new ones prefixed by >>)"
>> drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression

Indeed we perform the __iomem-less type casting but to an integer
variable. The integer variable isn't dereferenced then, so the casting is
safe and won't cause any problem. But in order to make sparse happy and
keep the code coherent let's fix the warning by converting the local
"shift" and "chunk" variables to the "unsigned int" type (since their
value won't ever exceed three) and cast the __iomem-pointers to uintptr_t.
Add the same fix to the bt1_rom_map_read() method for unification.

Fixes: b3e79e7682 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support")
Link: https://lore.kernel.org/lkml/202011021254.XC70BaQT-lkp@intel.com/
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201125072640.23516-1-Sergey.Semin@baikalelectronics.ru
2020-12-07 12:14:35 +01:00
..
amd76xrom.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
cfi_flagadm.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
ck804xrom.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
dc21285.c mtd: dc21285: use raw spinlock functions for nw_gpio_lock 2015-05-28 12:01:29 -07:00
esb2rom.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ichxrom.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
impa7.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
intel_vr_nor.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ixp4xx.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Kconfig mtd: physmap: Add Baikal-T1 physically mapped ROM support 2020-10-02 09:08:22 +02:00
l440gx.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
lantiq-flash.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile mtd: physmap: Add Baikal-T1 physically mapped ROM support 2020-10-02 09:08:22 +02:00
map_funcs.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
netsc520.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
nettel.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
pci.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
pcmciamtd.c mtd: maps: pcmciamtd: fix possible sleep-in-atomic-context bugs in pcmciamtd_set_vpp() 2020-01-27 16:55:02 +01:00
physmap-bt1-rom.c mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning 2020-12-07 12:14:35 +01:00
physmap-bt1-rom.h mtd: physmap: Add Baikal-T1 physically mapped ROM support 2020-10-02 09:08:22 +02:00
physmap-core.c mtd: physmap: Add Baikal-T1 physically mapped ROM support 2020-10-02 09:08:22 +02:00
physmap-gemini.c mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match' 2020-06-05 10:15:44 +02:00
physmap-gemini.h mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} 2018-11-05 22:24:29 +01:00
physmap-ixp4xx.c mtd: physmap_of: add a hook for Intel IXP4xx flash probing 2019-10-29 14:24:53 +01:00
physmap-ixp4xx.h mtd: physmap_of: add a hook for Intel IXP4xx flash probing 2019-10-29 14:24:53 +01:00
physmap-versatile.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
physmap-versatile.h mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} 2018-11-05 22:24:29 +01:00
pismo.c mtd: pismo: Simplify getting the adapter of a client 2019-09-15 23:50:39 +02:00
plat-ram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pmcmsp-flash.c mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy 2017-02-08 13:15:49 -08:00
pxa2xx-flash.c mtd: pxa2xx: Use ioremap_cache insted of ioremap_cached 2019-09-15 23:50:22 +02:00
rbtx4939-flash.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sa1100-flash.c mtd: Convert fallthrough comments into statements 2020-03-30 10:14:54 +02:00
sbc_gxx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sc520cdp.c mtd: Replace HTTP links with HTTPS ones 2020-08-02 22:17:19 +02:00
scb2_flash.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
scx200_docflash.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
solutionengine.c mtd/maps: fix solutionengine.c printk format warnings 2018-07-24 22:43:10 +02:00
sun_uflash.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
ts5500_flash.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
tsunami_flash.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uclinux.c mtd: maps: Make uclinux_ram_map static 2019-05-06 21:47:01 +02:00
vmu-flash.c mtd: maps: vmu-flash: fix typos for struct memcard 2020-10-02 09:08:27 +02:00