lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectInconsistency in ioread functions, const pointer or not
Date
Hello,

Sorry if this subject was discussed before, but I could not find
anything except

http://lkml.indiana.edu/hypermail/linux/kernel/0702.0/0328.html

The old ioreadx routines have been macros using the appropriate readx
functions or macros, those in turn used some raw read functions, which
finally used a memory pointer like this one:

static inline u8 __raw_readb(const volatile void __iomem *addr)

The iomap ioreadx functions have signatures like

extern unsigned int ioread8(void __iomem *)

I can understand the discussion about the volatile qualifier, but how
about the const?

Any pointer to discussions about removing const would be helpful.

If there are none of them, does anybody know the reason for removing
the const?

Additional question would be about the return types and target types
for the pointer, why they are int instead of e.g. u8 or void * instead
of u8 *, but probably this has to be another thread or was discussed
somewhere else.


Roman

--
Roman Fietze Telemotive AG Büro Mühlhausen
Breitwiesen 73347 Mühlhausen
Tel.: +49(0)7335/18493-45 http://www.telemotive.de
--
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: 2010-02-05 11:59    [W:0.146 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site