[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning
On Thu, 2020-11-12 at 18:00:37 UTC, Serge Semin wrote:
> 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 let's
> fix the warning just by converting the local "shift" and "chunk" variables
> to the "unsigned int" type. 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:
> Signed-off-by: Serge Semin <>
> Reported-by: kernel test robot <>
> Cc: Alexey Malahov <>
> Cc: Pavel Parkhomenko <>

Applied to nand/next, thanks.


 \ /
  Last update: 2020-11-19 22:09    [W:0.115 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site