[PATCH 39/39] pcmcia: don't add extra DEBUG cflag bugfix

Russell King rmk+pcmcia at arm.linux.org.uk
Fri Aug 22 03:51:51 EDT 2008


On Fri, Aug 22, 2008 at 01:06:32AM +0200, Peter Stuge wrote:
> On Thu, Aug 21, 2008 at 11:55:49PM +0200, Dominik Brodowski wrote:
> > > There is one warning left in the compilations, namely
> > > 
> > >   CC [M]  drivers/pcmcia/cardbus.o
> > > include/asm/io_32.h: In function ???memcpy_fromio???:
> > > include/asm/io_32.h:151: warning: passing argument 2 of ???__memcpy??? 
> > > discards qualifiers from pointer target type
> > > 
> > > I don't know how to get rid of it, but I'll look for your fix.
> > 
> > Hm, that doesn't seem to be pcmcia-specific... still, if you find a
> > fix for it, I'm all ears.
> 
> It's caused by the following line in pcmcia/cardbus.c:read_cb_mem():
> 
> 	memcpy_fromio(ptr, s->cb_cis_virt + addr, len);
> 
> s->cb_cis_virt is void __iomem * per include/pcmcia/ss.h while
> memcpy() takes const void * for argument 2.

memcpy might do, but this is memcpy_fromio.

> I don't have a recent tree, but adding a cast to the call should
> silence the warning:
> 
> 	memcpy_fromio(ptr, (const void *)s->cb_cis_virt + addr, len);

x86 32bit has:

static inline void
memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
{
        __memcpy(dst, (const void __force *)src, count);
}

which matches.  Maybe you need to report this to whoever looks after
the architecture you're trying to build for?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:



More information about the linux-pcmcia mailing list