[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition
Jörn Engel
joern at logfs.org
Fri Aug 3 05:21:40 EDT 2007
On Thu, 2 August 2007 22:23:47 -0700, Jared Hulbert wrote:
>
> > Interestingly __iomem makes less sense for some RAM-based drivers. So
> > maybe that part should get removed.
>
> (http://marc.info/?l=linux-arm-kernel&m=118193919321290&w=4)
> Russel King said:
> -->
> --> const void *start = virt + offset;
> -->
> --> This will generate a sparse warning (since you haven't used sparse you
> --> won't know about this.) The __iomem annotation does nothing as far as
> --> the C language goes, but sparse uses it to annotate variables as to
> --> which address space they refer to, and issues warnings if you try to
> --> cast between different address spaces. However, it does allow code
> --> which knows what it's doing to do such casts.
> -->
> --> const void *start = (void __force *)virt + offset;
> -->
> --> MTD people may like to make a note that the 'cached' element of struct
> --> map_info is assigned __iomem pointers (from ioremap_cached) but is
> --> itself not marked with an __iomem pointer. This will also produce
> --> sparse warnings.
>
> Now I think maybe it should be "void **virt" not "void __iomem **virt"
> and then just __force virt. Anybody know?
Just remove it. Even if the change made sense it should follow in a
seperate patch.
> > The whole patch was just a quick hack to get an opinion.
>
> Trying to move it forward...
Great!
Jörn
--
It does not matter how slowly you go, so long as you do not stop.
-- Confucius
More information about the linux-mtd
mailing list