lkml.org 
[lkml]   [2006]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] remove volatile from nmi.c
From
Date
On Fri, 2006-07-14 at 09:47 -0700, Linus Torvalds wrote:

>
> So I'd argue that it's actually _worse_ to do a "mindless" conversion away
> from volatile, than it is to just remove them outright. Removing them
> outright may show a bug that the volatile hid (and at that point, people
> may see what the _deeper_ problem was), but at least it won't add a memory
> barrier that isn't necessary and will potentially just confuse people.

Perfectly agree, and that is why in my post I said this was a learning
experience for me and to please review. Thinking, at worst you guys
just tell me I'm completely wrong. At best I find a real bug and have a
fix for it. Seems I'm in between the two ;)

I believe I did find a real bug (just luck that it worked) but as you
say, my fix is wrong and if applied would hide the bug. So this was to
bring attention to would be bugs, and in the mean time, I learn exactly
how to use memory barriers and how to get rid of volatiles. Yes, this
was more of a blind change, and I should have looked more into exactly
what the code was doing. But this was more to bring attention to a
problem area than really to solve it.

Thanks for responding and giving me a lesson :)

-- Steve


-
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: 2006-07-14 19:03    [W:0.099 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site