mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Baole Ni <baolex.ni@intel.com>
Cc: linux-kernel@vger.kernel.org, chuansheng.liu@intel.com
Subject: Re: [PATCH 0002/1285] Replace numeric parameter like 0444 with macro
Date: Tue, 2 Aug 2016 10:11:18 -0400	[thread overview]
Message-ID: <3cdd406b-d7e7-bc24-14df-be55432b7621@gmail.com> (raw)
In-Reply-To: <20160802103327.13880-1-baolex.ni@intel.com>

On 2016-08-02 06:33, Baole Ni wrote:
> I find that the developers often just specified the numeric value
> when calling a macro which is defined with a parameter for access permission.
> As we know, these numeric value for access permission have had the corresponding macro,
> and that using macro can improve the robustness and readability of the code,
> thus, I suggest replacing the numeric parameter with the macro.
Have you taken the time to consider _why_ this is common practice?  In 
most cases, people who have been using UNIX-like systems for any 
reasonable period of time can mentally parse the octal permissions 
almost instantly, while it often takes them a while to figure out the 
macros.  So, overall, this change actually hurts readability for a large 
number of people.

Additionally, the argument of robustness is somewhat bogus too, the 
internal representation of POSIX DAC permissions is not going to change 
any time soon, if at all, so abstracting the values away isn't really 
improving robustness considering that what it's supposed to protect 
against won't ever happen.

Beyond that, there are also a number of other issues with the set as a 
whole:
1. In many places, you haven't properly re-wrapped lines at the 80 
column limit.
2. In many places, you haven't condensed macros like you should (for 
example, 0644 should be (S_IWUSR | S_IRUGO), not (S_IWUSR | S_IRUSR | 
S_IRGRP | S_IROTH), and this would help with the line length limit too).
3. You're missing subsystem tags in your patch subjects.
4. Patches shouldn't be per-file for changes like this, they should be 
per-subsystem.  Dropping this many patches (you've sent more patches in 
a few hours than the whole sees in a day on average) is a very good way 
to get people to ignore you.

      reply	other threads:[~2016-08-02 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 10:33 Baole Ni
2016-08-02 14:11 ` Austin S. Hemmelgarn [this message]

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=3cdd406b-d7e7-bc24-14df-be55432b7621@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=baolex.ni@intel.com \
    --cc=chuansheng.liu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®