Re: Being more anal about iospace accesses..
From: Horst von Brand
Date: Wed Sep 15 2004 - 12:44:57 EST
=?iso-8859-1?Q?J=F6rn?= Engel <joern@xxxxxxxxxxxxxxxxxxxx> said:
> On Wed, 15 September 2004 09:30:42 -0700, Linus Torvalds wrote:
[...]
> > For example, if you don't know (or, more importantly - don't care) what
> > kind of IO interface you use, you can now do something like
> >
> > void __iomem * map = pci_iomap(dev, bar, maxbytes);
> > ...
> > status = ioread32(map + DRIVER_STATUS_OFFSET);
> C now supports pointer arithmetic with void*?
It doesn't. It's a gcc-ism.
> I hope the width of a
> void is not architecture dependent, that would introduce more subtle
> bugs.
gcc takes it as a char pointer for such uses.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
-
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/