Re: [PATCH tip/core/rcu 09/15] rcu: Increasing rcu_barrier()concurrency

From: Steven Rostedt
Date: Fri Jun 15 2012 - 20:21:42 EST


On Fri, 2012-06-15 at 16:31 -0700, Josh Triplett wrote:
>
> > - smp_mb(); /* Prevent any prior operations from leaking in. */
> > + /*
> > + * Ensure tht all prior references, including to ->n_barrier_done,
> > + * are ordered before the _rcu_barrier() machinery.
> > + */
> > + smp_mb(); /* See above block comment. */
>
> If checkpatch complains about the lack of a comment to the right of a
> barrier even when the barrier has a comment directly above it, that
> seems like a bug in checkpatch that needs fixing, to prevent developers
> from having to add noise like "See above block comment.". :)


Yuck yuck yuck yuck!!!


Really, checkpatch is not the golden rule. I've copied an old checkpatch
from something like 2.6.38 or so and use that today, where it was still
reasonable. I've long abandoned the latest checkpatch, as it causes too
many false positives. Or nazis like dictation.

My rule of thumb is this. If what checkpatch tells you to do makes the
format either uglier, or look stupid, it's a good idea to ignore the
checkpatch complaint.

I think in this case, you hit the latter.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/