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

Peter Stuge stuge-linux-pcmcia at cdy.org
Thu Aug 21 19:06:32 EDT 2008


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.

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);


//Peter



More information about the linux-pcmcia mailing list