lkml.org 
[lkml]   [2004]   [May]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectWhat types are the parameters of memcpy_toio?
FromRoland Dreier <>
Date16 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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [from the cache]
©2003-2008