From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers Date: Mon, 4 Jan 2016 16:11:23 +0000 Message-ID: <20160104161123.GJ19062@n2100.arm.linux.org.uk> References: <1451907395-15978-1-git-send-email-mst@redhat.com> <1451907395-15978-2-git-send-email-mst@redhat.com> <1451923660.4334.83.camel@perches.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=5cmVXa6Fw5SeJ9x2CW3yGFzjMUnwhVS2N9PDGqW4tvg=; b=nI/xwnuorOat6jBLTEp2Ull/oh4AkTAQ2IwL5aZQama/ZqU1mqQWjBHbVeGhEifcgFhD8+qvGQ3IhoOTHcVkxMZpoHf6SfayXzx/MMJR62gWFby2GMnO/N714zWt4fhrv2W35+yL1Aiwpemee3jrPYG8RkPTFLi0hil7Jwgy3VU=; Content-Disposition: inline In-Reply-To: <1451923660.4334.83.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joe Perches Cc: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, "Cc : Andy Whitcroft" , Peter Zijlstra , Arnd Bergmann , linux-arch@vger.kernel.org, Andrew Cooper , virtualization@lists.linux-foundation.org, Stefano Stabellini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , David Miller , linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, x86@kernel.org, user-mode-linux-devel@lists.sourceforge.net, adi-buildroot-devel@lists.sourceforge.net, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, xen-devel@lists.xenpr On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > + my $all_barriers = join('|', (@barriers, @smp_barriers)); > > + > > + if ($line =~ /\b($all_barriers)\(/) { > > It would be better to use /\b$all_barriers\s*\(/ > as there's no reason for the capture and there > could be a space between the function and the > open parenthesis. I think you mean /\b(?:$all_barriers)\s*\(/ as 'all_barriers' will be: mb|wmb|rmb|smp_mb|smp_wmb|smp_rmb and putting that into your suggestion results in: /\bmb|wmb|rmb|smp_mb|smp_wmb|smp_rmb\s*\(/ which is clearly wrong - the \b only applies to 'mb' and the \s*\( only applies to smp_rmb. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.