From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933659AbcIFOfA (ORCPT ); Tue, 6 Sep 2016 10:35:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:60365 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755473AbcIFOea (ORCPT ); Tue, 6 Sep 2016 10:34:30 -0400 Date: Tue, 6 Sep 2016 16:34:13 +0200 From: Jean Delvare To: Peter Zijlstra 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: <20160906163413.470f37d4@endymion> In-Reply-To: <20160905115838.GC10153@twins.programming.kicks-ass.net> References: <57CAFFDC.4030606@iogearbox.net> <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> Organization: SUSE Linux X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.30; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Mon, 5 Sep 2016 13:58:38 +0200, Peter Zijlstra wrote: > On Mon, Sep 05, 2016 at 01:54:45PM +0200, Jean Delvare wrote: > > On Mon, 5 Sep 2016 13:37:04 +0200, Peter Zijlstra wrote: > > > I have it in my local .gitconfig, and recommend it to people who send me > > > patches. > > > > What does it look like, please? > > [diff "default"] > xfuncname = "^[[:alpha:]$_].*[^:]$" OK, I see. As mentioned somewhere else, it fails for labels which have comments. I was also surprised by the $ but apparently it's valid in identifiers for at least some incarnations of C o.O 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. The reason why I proposed an update to CodingStyle regarding this topic was precisely to avoid having to repeat the same to contributors, like you do (although our recommendations are different.) 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. It would still be a problem for me as an inveterate quilt user, at least until GNU diff gets "fixed." Which I did not even try, as I'm not sure if upstream really considers this a bug in the first place. And just for completeness, git's "cpp" predefined pattern doesn't actually support $ as part of identifiers. -- Jean Delvare SUSE L3 Support