Re: [PATCH] Kill some sparse warnings

From: Peter Hagervall
Date: Tue Feb 15 2005 - 18:34:48 EST


On Tue, Feb 15, 2005 at 10:56:56PM +0000, Russell King wrote:
> On Tue, Feb 15, 2005 at 11:45:53PM +0100, Peter Hagervall wrote:
> > Cleaned up some address space issues in:
>
> This is wrong, and highlights a problem with the "remote" dma pool API.
> dma_alloc_coherent() normally returns CPU-local memory, unless you've
> declared remote memory, in which case it's __iomem-type memory.
>
> Therefore, I don't think we want to mark the return value of
> dma_alloc_coherent with __iomem, because in the vast majority of
> cases, it isn't.

Doh! My bad, I changed the attribute for the return value to get it on
par with the dma-mapping.h file, which as it turned out, was changed
by myself some time ago.

An aonther issue, what I'd like to see, is sort of a "don't care"
attribute which could be used to mark some of the library functions,
e.g. memset and family. AFAICS, many of them shouldn't need to care what
address space they're handling, and at the same time we could get rid of
a lot of the __force casts. Please correct me if this sounds completely
wrong or otherwise insane.

Any other comments welcome.

--
Peter Hagervall <hager@xxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/