diff options
author | Serge Semin <[email protected]> | 2020-11-25 10:26:40 +0300 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2020-12-07 12:14:35 +0100 |
commit | 18b9c9403758ff68d93ee2f593096778d58e6f76 (patch) | |
tree | 825499d52e87c6d9acbce78ce58f455d6ac37ad0 /scripts/clang-tools/gen_compile_commands.py | |
parent | 639a82434f16a6df0ce0e7c8595976f1293940fd (diff) |
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: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support")
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Serge Semin <[email protected]>
Reported-by: kernel test robot <[email protected]>
Cc: Alexey Malahov <[email protected]>
Cc: Pavel Parkhomenko <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions