lkml.org 
[lkml]   [2004]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectWhat types are the parameters of memcpy_toio?
From
Date
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 14:03    [W:0.231 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site