mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Hugh Dickins <hughd@google.com>, Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Seth Jennings <sjenning@redhat.com>,
	Dan Streetman <ddstreet@ieee.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Use octal not symbolic permissions
Date: Wed, 28 Mar 2018 08:44:51 -0700	[thread overview]
Message-ID: <1522251891.12357.102.camel@perches.com> (raw)
In-Reply-To: <20180328130623.GB8976@dhcp22.suse.cz>

On Wed, 2018-03-28 at 15:06 +0200, Michal Hocko wrote:
> On Mon 26-03-18 15:22:32, Joe Perches wrote:
> > mm/*.c files use symbolic and octal styles for permissions.
> > 
> > Using octal and not symbolic permissions is preferred by many as more
> > readable.
> > 
> > https://lkml.org/lkml/2016/8/2/1945
> > 
> > Prefer the direct use of octal for permissions.
> > 
> > Done using
> > $ scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace mm/*.c
> > and some typing.
> > 
> > Before:	 $ git grep -P -w "0[0-7]{3,3}" mm | wc -l
> > 44
> > After:	 $ git grep -P -w "0[0-7]{3,3}" mm | wc -l
> > 86
> 

> Ohh, I absolutely detest those symbolic names. I always have to check
> what they actually mean to be sure. Octal representation is quite
> natural to read. So for once I am really happy about such a clean up
> change.
> 
> Btw. something like this should be quite easy to automate via
> coccinelle AFAIU. 

checkpatch is currently better at this, for some
definition of better, than Coccinelle.

Julia and I had a discussion about it awhile ago.
https://lkml.org/lkml/2017/2/4/140

S_<FOO> groupings need to be combined and can
appear in arbitrary order.

Coccinelle would need the same octal addition in
some code path as checkpatch already has.

> > Miscellanea:
> > 
> > o Whitespace neatening around these conversions.
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> 
> I hope I haven't overlooked any potential mismatch...

Doubtful as the conversion is completely automated.

  reply	other threads:[~2018-03-28 15:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 22:22 Joe Perches
2018-03-26 22:36 ` David Rientjes
2018-03-26 23:05   ` Joe Perches
2018-03-26 22:41 ` Andrew Morton
2018-03-26 22:50   ` Joe Perches
2018-03-28 13:06 ` Michal Hocko
2018-03-28 15:44   ` Joe Perches [this message]
2018-03-28 19:07     ` Michal Hocko
2018-03-28 19:26       ` Joe Perches

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=1522251891.12357.102.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=ddstreet@ieee.org \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sjenning@redhat.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

all inboxes | Powered by JetHome®