lkml.org 
[lkml]   [1999]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWhat is the right type to store virtual address ?
Hi,
if we are talking about endianess, I have one related small
question: in variable of which type I should store return
value from ioremap() ? I browsed all sources and I found that:
ioremap() returns 'void*' on all archs
check_signature() wants to obtain 'unsigned long' on all
archs
readb() casts its parameter (sometime to ul, sometime to
void*); only sparc wants 'unsigned long'
__raw_readb() exist only on Alpha. Wants unsigned long...
memset_io() wants 'void*' on sparc64, others do casts
Different drivers use 'unsigned long' or 'void*', probably
authors randomly selected one of usual types.
Any idea? If some archs (Alpha) preffers 'unsigned long',
but others (sparc64 (and me, but I'm not 'arch')) 'void*', we
should define some new type... Or change definitions of
sparc64 or Alpha. It is really confusing if you must pass
unsigned long to check_signature, but void* to memset_io,
because of otherwise it will complain on some (PCI capable)
archs...
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.058 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site