LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* What types are the parameters of memcpy_toio?
@ 2004-05-17  4:03 Roland Dreier
  2004-05-17 18:28 ` memcpy_to/fromio cleanups for x86_64 Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Dreier @ 2004-05-17  4:03 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-17 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-17  4:03 What types are the parameters of memcpy_toio? Roland Dreier
2004-05-17 18:28 ` memcpy_to/fromio cleanups for x86_64 Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).