Re: [PATCH trivial] include/linux/gfp.h: Improve the coding styles
From: Chen Gang
Date: Fri Feb 26 2016 - 09:54:30 EST
On 2/26/16 06:39, Jiri Kosina wrote:
> On Fri, 26 Feb 2016, Chen Gang wrote:
>> git is a tool mainly for analyzing code, but not mainly for normal
>> reading main code.
>> So for me, the coding styles need not consider about git.
> You are mistaken here. It's very helpful when debugging;
For me, 'debugging' is related with debugger (e.g. kdb or kgdb), and
'tracing' is related with dumping log, and code analyzing is related
with "git diff" and "git blame".
And yes, for me, "git diff" and "git blame" is really very helpful for
> usually you want
> to find the commit that introduced particular change, and read its
> changelog (at least). Having to cross rather pointless changes just adds
> time (need to restart git-blame with commit~1 as a base) for no really
> good reason.
That is the reason why I am not quite care about body files, I often use
"git log -p filename", the cleanup code patch has negative effect with
code analyzing (although for me, it should still need to be cleanup).
But in our case, it is for the shared header file:
- They are often the common base file, the main contents will not be
changed quite often, and their contents are usually simple enough (
e.g. gfp.h in our case), they are not often for "code analyzing".
- But they are quite often read in normal reading ways by programmers
(e.g. open with normal editors). For normal reading, programmers
usually care about the contents, not the changes.
- So for me, the common shared header files need always take care about
coding styles, and need not consider about code analyzing.
And if we reject this kind of patch (in our case), I guess, that almost
mean: "for the common shared header files, their bad coding styles will
be remain for ever".
Chen Gang (éå)
Managing Natural Environments is the Duty of Human Beings.