Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753515Ab3I0O02 (ORCPT ); Fri, 27 Sep 2013 10:26:28 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54631 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751993Ab3I0O0Z (ORCPT ); Fri, 27 Sep 2013 10:26:25 -0400 Date: Fri, 27 Sep 2013 16:26:05 +0200 From: Peter Zijlstra To: Joe Perches Cc: Ingo Molnar , Tim Chen , Jason Low , Davidlohr Bueso , Ingo Molnar , Andrew Morton , Andrea Arcangeli , Alex Shi , Andi Kleen , Michel Lespinasse , Davidlohr Bueso , Matthew R Wilcox , Dave Hansen , Rik van Riel , Peter Hurley , linux-kernel@vger.kernel.org, linux-mm Subject: Re: [PATCH] checkpatch: Make the memory barrier test noisier Message-ID: <20130927142605.GC15690@laptop.programming.kicks-ass.net> References: <1380228059.2170.10.camel@buesod1.americas.hpqcorp.net> <1380229794.2602.36.camel@j-VirtualBox> <1380231702.3467.85.camel@schen9-DESK> <1380235333.3229.39.camel@j-VirtualBox> <1380236265.3467.103.camel@schen9-DESK> <20130927060213.GA6673@gmail.com> <20130927112323.GJ3657@laptop.programming.kicks-ass.net> <1380289495.17366.91.camel@joe-AO722> <20130927134802.GA15690@laptop.programming.kicks-ass.net> <1380291257.17366.103.camel@joe-AO722> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1380291257.17366.103.camel@joe-AO722> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 33 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 > Signed-off-by: Joe Perches Acked-by: Peter Zijlstra -- 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/