lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH/RFC] m68k/bitops: Make bitmap data pointer of atomic ops volatile
Date
On Tuesday 07 June 2011, Ben Hutchings wrote:
> On Tue, Jun 07, 2011 at 01:22:29PM +0200, Arnd Bergmann wrote:

> > I guess what happened is that some variables are traditionally marked
> > as volatile although they shouldn't be, and most architectures have
> > adapted their bitops to make the warnings go away. If you see more
> > warnings of that kind, it's probably fine to just do the same on m68k.
> > The volatile modifier doesn't really hurt in this case.
>
> These operations are required to be atomic and therefore they
> must be suitable for use with volatile-qualified variables.

As I said, it's not wrong for them to have a volatile qualifier in the
argument list. However, there should also not be the need for the
qualifier in any of the callers, because the bitops only work if
all accesses to the data are done through bitops functions, and that
means that the qualifier on the variable is completely meaningless.

Arnd


\
 
 \ /
  Last update: 2011-06-07 15:59    [W:1.256 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site