[firefly] __iomen, iounmap, sparse relating question

Matei Oprea eu at opreamatei.ro
Wed Mar 19 00:40:10 EET 2014


Tried to fix a warning like this one:

drivers/staging/cxt1e1/hwprobe.c:180:23: warning: incorrect type in
argument 1 (different address spaces)
drivers/staging/cxt1e1/hwprobe.c:180:23:    expected void volatile
[noderef] <asn:2>*addr
drivers/staging/cxt1e1/hwprobe.c:180:23:    got void *<noident>

I am compiling using make C=1 /path/to/dir
The line is the following :

iounmap ((void *) (hi->addr_mapped[0]));

Adding (and requiring) a cookie like __iomem for all I/O accesses is a
way to be stricter and avoid programming errors.

I'm trying to fix the error like this :

void __iomem* io_unmap = iounmap (hi->add_mapped[0]);

Is this good or bad ? I need some feedback. Thank you !

Oprea Matei

More information about the firefly mailing list