Re: [PATCH] Documentation/memory-barriers: fix wrong comment in example

From: SeongJae Park
Date: Mon Feb 22 2016 - 06:09:09 EST




On Mon, 22 Feb 2016, David Howells wrote:

SeongJae Park <sj38.park@xxxxxxxxx> wrote:

a = 0;
/* Code that does not store to variable a. */
+ does_not_change_a();
a = 0;

Since it's not actually code that's meant to be executed, you could make it:

a = 0;
... code that does not store to variable a ...
a = 0;

I selected Paul's third option because the function could be noop (In this
case, it doesn't break the original meaning) and it makes the code looks
complete.
However, your suggestion looks much better than the comment, too.

So, I am attaching a patch that applying your suggestion below.


=============================== >3 ====================================