lkml.org 
[lkml]   [2008]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: use of volatile in iounmap()?
On Fri, Mar 28, 2008 at 09:34:28PM +0100, Sam Ravnborg wrote:
> While reviewing some CAN driver I stumbled on iounmap
> which has following prototype on x86:
>
> extern void iounmap(volatile void __iomem *addr);
>
> I argued that the driver should not use volatile
> but then I cannot explain why the argument to
> iounmap takes a volatile.
>
> The same goes for many other functions in
> the io*.h headers.
>
> Grepping the other archs they mostly follow
> same pattern.
>
> Can anyone explain the rational for volatile in this case.

"Passing a pointer to volatile is allowed, along with passing pointers
to unqualified".


\
 
 \ /
  Last update: 2008-03-28 22:19    [W:0.323 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site