Re: [PATCH] checkpatch: Make the memory barrier test noisier

From: Peter Zijlstra
Date: Fri Sep 27 2013 - 10:26:31 EST


On Fri, Sep 27, 2013 at 07:14:17AM -0700, Joe Perches wrote:
> Peter Zijlstra prefers that comments be required near uses
> of memory barriers.
>
> Change the message level for memory barrier uses from a
> --strict test only to a normal WARN so it's always emitted.
>
> This might produce false positives around insertions of
> memory barriers when a comment is outside the patch context
> block.

One would argue that in that case they're too far away in any case :-)

> And checkpatch is still stupid, it only looks for existence
> of any comment, not at the comment content.

Could we try and alleviate this by giving a slightly more verbose
warning?

Maybe something like:

memory barrier without comment; please refer to the pairing barrier and
describe the ordering requirements.

> Suggested-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

Acked-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
--
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/