Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477464
| From | Jean Delvare <jdelvare@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() |
| Date | 2016-09-06 16:40 +0200 |
| Message-ID | <sepHA-3dy-21@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <sdCnv-3za-7@gated-at.bofh.it> <sdZWO-2Y7-5@gated-at.bofh.it> <se0pQ-381-17@gated-at.bofh.it> <se0Jb-3fd-11@gated-at.bofh.it> <se0Jb-3fd-9@gated-at.bofh.it> |
| Organization | SUSE Linux |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] sparc: bpf_jit: Fine-tuning for bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-03 18:40 +0200
[PATCH 1/4] sparc: bpf_jit: Use kmalloc_array() in bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-03 18:40 +0200
Re: [PATCH 1/4] sparc: bpf_jit: Use kmalloc_array() in bpf_jit_compile() Daniel Borkmann <daniel@iogearbox.net> - 2016-09-03 19:00 +0200
[PATCH 4/4] sparc: bpf_jit: Rename jump labels in bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-03 18:50 +0200
Re: [PATCH 4/4] sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Daniel Borkmann <daniel@iogearbox.net> - 2016-09-03 19:00 +0200
Re: [PATCH 4/4] sparc: bpf_jit: Rename jump labels in bpf_jit_compile() David Miller <davem@davemloft.net> - 2016-09-04 08:20 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-04 09:00 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() David Miller <davem@davemloft.net> - 2016-09-04 09:00 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-04 09:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() David Miller <davem@davemloft.net> - 2016-09-04 09:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-04 09:50 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Daniel Borkmann <daniel@iogearbox.net> - 2016-09-04 12:00 +0200
Re: Clarification for source code formatting around jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-04 16:00 +0200
Re: Clarification for source code formatting around jump labels Daniel Borkmann <daniel@iogearbox.net> - 2016-09-04 19:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Jean Delvare <jdelvare@suse.de> - 2016-09-05 13:10 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Peter Zijlstra <peterz@infradead.org> - 2016-09-05 13:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Peter Zijlstra <peterz@infradead.org> - 2016-09-05 14:00 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Jean Delvare <jdelvare@suse.de> - 2016-09-06 16:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Peter Zijlstra <peterz@infradead.org> - 2016-09-06 16:50 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Joe Perches <joe@perches.com> - 2016-09-06 17:30 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Jean Delvare <jdelvare@suse.de> - 2016-09-07 14:40 +0200
Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile() Jean Delvare <jdelvare@suse.de> - 2016-09-05 14:00 +0200
[PATCH 3/4] sparc: bpf_jit: Avoid assignment for "flen" if BPF JIT is disabled SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-03 18:50 +0200
Re: [PATCH 3/4] sparc: bpf_jit: Avoid assignment for "flen" if BPF JIT is disabled Daniel Borkmann <daniel@iogearbox.net> - 2016-09-03 19:00 +0200
csiph-web