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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Darren, 

Thank you very much! I'll be glad to take your advice.

Baole

-----Original Message-----
From: Darren Hart [mailto:dvhart@xxxxxxxxxxxxx] 
Sent: Saturday, August 06, 2016 6:57 AM
To: Henrique de Moraes Holschuh
Cc: Ni, BaoleX; ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx; platform-driver-x86@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Liu, Chuansheng
Subject: Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro

On Tue, Aug 02, 2016 at 02:34:07PM -0300, Henrique de Moraes Holschuh wrote:
> (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@xxxxxxxxx>
> > Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
> 
> 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.

While I'm generally in favor of using macros where they exist, I do agree with Henrique that this is actually less legible.

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

Indeed. 1285 patches with the same subject line is "not ideal". Prefixing with the subsystem at the very least would have been an improvement. An RFC on the concept, cc'ing the subsystem maintainers to get consensus and direction on how to manage the large change would have been advisable.

I'm dropping these for pdx86 unless a compelling argument arises for including them (like - the only subsystem not taking these is pdx86...)

--
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux