Re: Being more anal about iospace accesses..

From: Roland Dreier
Date: Wed Sep 15 2004 - 12:36:51 EST


Jörn> C now supports pointer arithmetic with void*? I hope the
Jörn> width of a void is not architecture dependent, that would
Jörn> introduce more subtle bugs.

Pointer arithmetic on void * has been a gcc extension since forever
(gcc acts as though sizeof (void) == 1).

However, I somewhat agree -- it's ugly for drivers rely on this and do
arithmetic on void *. It should be OK for a driver to use
char __iomem * for its IO base if it needs to add in offsets, right?

- R.
-
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/