Messages in this thread | | | Subject | What types are the parameters of memcpy_toio? | From | Roland Dreier <> | Date | 16 May 2004 21:03:29 -0700 |
| |
This may be a silly question, but what are the types of the parameters of memcpy_toio and memcpy_fromio? I was under the impression that IO addresses are "cookies" and not pointers, and hence should be kept as unsigned long.
However, <asm-x86_64/io.h> declares them as
void *memcpy_fromio(void*,const void*,unsigned); void *memcpy_toio(void*,const void*,unsigned);
which means my code (which uses unsigned long) gets warnings like
warning: passing arg 1 of `memcpy_toio' makes pointer from integer without a cast
Other architectures seem to expect the IO address to be unsigned long and explicitly cast it to a pointer.
Thanks, Roland - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |