From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935954AbcHBRng (ORCPT ); Tue, 2 Aug 2016 13:43:36 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45291 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936112AbcHBRmM (ORCPT ); Tue, 2 Aug 2016 13:42:12 -0400 X-Sasl-enc: ujK0dyGqkuCjReBVI3YbZbBeplMrWODzxg3V1AaOLGZT 1470159250 Date: Tue, 2 Aug 2016 14:34:07 -0300 From: Henrique de Moraes Holschuh To: Baole Ni Cc: dvhart@infradead.org, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com Subject: Re: [PATCH 0857/1285] Replace numeric parameter like 0444 with macro Message-ID: <20160802173407.GA1939@khazad-dum.debian.net> References: <20160802115249.7120-1-baolex.ni@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160802115249.7120-1-baolex.ni@intel.com> X-GPG-Fingerprint1: 4096R/39CB4807 C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (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 > Signed-off-by: Baole Ni 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