From: Michal Hocko <mhocko@kernel.org>
To: Chen Gang <chengang@emindsoft.com.cn>
Cc: trivial@kernel.org, akpm@linux-foundation.org, vbabka@suse.cz,
rientjes@google.com, linux-kernel@vger.kernel.org,
hannes@cmpxchg.org, mgorman@techsingularity.net,
vdavydov@virtuozzo.com, dan.j.williams@intel.com,
linux-mm@kvack.org
Subject: Re: [PATCH trivial] include/linux/gfp.h: Improve the coding styles
Date: Thu, 25 Feb 2016 15:47:19 +0100 [thread overview]
Message-ID: <20160225144718.GD4204@dhcp22.suse.cz> (raw)
In-Reply-To: <56CF0E6A.2090204@emindsoft.com.cn>
On Thu 25-02-16 22:23:38, Chen Gang wrote:
> On 2/25/16 16:57, Michal Hocko wrote:
> > On Thu 25-02-16 06:26:31, chengang@emindsoft.com.cn wrote:
> >>
> >> Always notice about 80 columns, and the white space near '|'.
> >>
> >> Let the wrapped function parameters align as the same styles.
> >>
> >> Remove redundant statement "enum zone_type z;" in function gfp_zone.
> >
> > I do not think this is an improvement. The comment placement is just odd
> > and artificially splitting the mask into more lines makes git grep
> > harder to use.
> >
>
> Excuse me, I am not quite sure your meaning is the whole contents of the
> patch is worthless, or only for the "comment placement"?
>
> For the "comment placement" the common way is below, but still make git
> grep harder:
if you did git grep ZONE_MOVABLE you would get less information
>
> -#define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */
> +/* ZONE_MOVABLE allowed */
> +#define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE)
>
> Then how about:
>
> -#define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */
> +#define __GFP_MOVABLE \
> ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */
>
> or:
>
> -#define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */
> +#define __GFP_MOVABLE /* ZONE_MOVABLE allowed */ \
> ((__force gfp_t)___GFP_MOVABLE)
Now looks worse then other, really. Please try to think what would be
a benefit of such change. As Mel already pointed out git blame would
take an additional step to get back to the patch which has introduced
them. And what is the advantage? Make 80 characters-per-line rule happy?
I just do not think this is worth changes at all.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-02-25 14:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 22:26 chengang
2016-02-25 1:01 ` SeongJae Park
2016-02-25 14:12 ` Chen Gang
2016-02-25 8:57 ` Michal Hocko
2016-02-25 14:23 ` Chen Gang
2016-02-25 14:47 ` Michal Hocko [this message]
2016-02-25 22:17 ` Chen Gang
2016-02-25 9:27 ` Mel Gorman
2016-02-25 14:38 ` Chen Gang
2016-02-25 15:12 ` Jiri Kosina
2016-02-25 22:19 ` Chen Gang
2016-02-25 16:07 ` Mel Gorman
2016-02-25 22:29 ` Chen Gang
2016-02-25 22:39 ` Jiri Kosina
2016-02-26 14:57 ` Chen Gang
2016-02-25 23:12 ` SeongJae Park
2016-02-26 15:06 ` Chen Gang
2016-02-26 2:32 ` Jianyu Zhan
2016-02-26 15:26 ` Chen Gang
2016-02-27 2:45 ` Theodore Ts'o
2016-02-27 14:32 ` Chen Gang
2016-02-27 16:53 ` Theodore Ts'o
2016-02-28 0:21 ` Chen Gang
2016-02-28 13:27 ` Mel Gorman
2016-02-28 15:28 ` Chen Gang
2016-02-27 23:14 ` Jiri Kosina
2016-02-28 0:47 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160225144718.GD4204@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chengang@emindsoft.com.cn \
--cc=dan.j.williams@intel.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=rientjes@google.com \
--cc=trivial@kernel.org \
--cc=vbabka@suse.cz \
--cc=vdavydov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox