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, Geert Uytterhoeven wrote:
> You mean the host_busy variable in the IDE code?
> That would also apply to context_flag in the DRM code:
>
> drivers/gpu/drm/drm_context.c:233: warning: passing argument 2 of
> ‘__constant_test_and_set_bit’ discards qualifiers from pointer target
> type
> drivers/gpu/drm/drm_context.c:233: warning: passing argument 2 of
> ‘__generic_test_and_set_bit’ discards qualifiers from pointer target
> type

Yes, that fits the same category.

> > is wrong, though. It probably doesn't hurt to do both.
>
> asm-generic/bitops/atomic.h has the volatiles everywhere. That's why
> I'm wondering.

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.

Arnd
--
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: 2011-06-07 13:25    [W:0.071 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site