From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934972AbcIFOs1 (ORCPT ); Tue, 6 Sep 2016 10:48:27 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37536 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933039AbcIFOsV (ORCPT ); Tue, 6 Sep 2016 10:48:21 -0400 Date: Tue, 6 Sep 2016 16:47:56 +0200 From: Peter Zijlstra To: Jean Delvare Cc: Daniel Borkmann , Jonathan Corbet , David Miller , sparclinux@vger.kernel.org, Adam Buchbinder , Alexei Starovoitov , Rabin Vincent , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini , linux-doc@vger.kernel.org Subject: Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Message-ID: <20160906144756.GF2794@worktop> References: <20160903.230607.1667562673788737377.davem@davemloft.net> <1365a588-c7c7-717c-1e3d-ceabd71e8479@users.sourceforge.net> <20160903.235916.1892276070318494855.davem@davemloft.net> <57CBEFEA.3080007@iogearbox.net> <20160905130737.74f63abe@endymion> <20160905113704.GA10153@twins.programming.kicks-ass.net> <20160905135445.501814a1@endymion> <20160905115838.GC10153@twins.programming.kicks-ass.net> <20160906163413.470f37d4@endymion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160906163413.470f37d4@endymion> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2016 at 04:34:13PM +0200, Jean Delvare wrote: > > [diff "default"] > > xfuncname = "^[[:alpha:]$_].*[^:]$" > > OK, I see. As mentioned somewhere else, it fails for labels which have > comments. Heh, There's labels that have comments? > My worry is that you recommending it to contributors on a individual > and opportunity basis, doesn't scale. Basing coding style > recommendations on a personal quirk doesn't strike me as the best idea > ever in the long run. Don't care too much, I simply will not take any patch that adds stupid spaces :-) > While looking at the syntax of your example, I have found something > which looks more promising. git already has predefined xfuncname > definitions for various languages, including C. These can be enabled > based on file name patterns via gitattributes. The > following .gitattribute file placed at the root of the kernel source > tree achieves what you want: > > *.c diff=cpp > *.h diff=cpp > > The major difference between git config and gitattributes is that the > latter can be part of the project itself, just like gitignore. So we > could just push that .gitattribute file upstream, and then labels > without leading spaces would no longer be a problem, at least within > git. Works for me, and last time this came up Linus agreed with the "whitespace before labels is stupid" thing. Although I cannot find a link to that just now. > It would still be a problem for me as an inveterate quilt user, Add the below to your .quiltrc or environment: QUILT_DIFF_OPTS="-F ^[[:alpha:]\$_].*[^:]\$" Same caveat about labels with comments, but then I'd not take a patch doing that in the first place.