Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1455183

Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro

From Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Newsgroups linux.kernel
Subject Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro
Date 2016-08-02 19:50 +0200
Message-ID <s1LZg-7Ht-15@gated-at.bofh.it> (permalink)
References <s1H9g-4r7-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


(cc list trimmed)

On Tue, 02 Aug 2016, 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.
> 
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> Signed-off-by: Baole Ni <baolex.ni@intel.com>

NACK.

IMO, the proposed change reduces readiability for no good reason.  Most
people touching kernel code have 0444, 0644, 0755, etc. already
hardwired into their pattern recognition neural network, while the POSIX
S_* crap is actually bug food.

PS: no more ill-managed ultra-large patch bombs, *please*.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0857/1285] Replace numeric parameter like 0444 with macro Baole Ni <baolex.ni@intel.com> - 2016-08-02 14:40 +0200
  Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-08-02 19:50 +0200
    Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro Darren Hart <dvhart@infradead.org> - 2016-08-07 01:40 +0200
      RE: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro "Ni, BaoleX" <baolex.ni@intel.com> - 2016-08-08 08:50 +0200

csiph-web