From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935553AbcHBQq3 (ORCPT ); Tue, 2 Aug 2016 12:46:29 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33478 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935540AbcHBQqQ (ORCPT ); Tue, 2 Aug 2016 12:46:16 -0400 Message-ID: <1470156329.16559.57.camel@infradead.org> Subject: Re: [PATCH 0867/1285] Replace numeric parameter like 0444 with macro From: Geoff Levand To: Baole Ni , benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, dwmw2@infradead.org, m.chehab@samsung.com, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com Date: Tue, 02 Aug 2016 09:45:29 -0700 In-Reply-To: <20160802115333.7780-1-baolex.ni@intel.com> References: <20160802115333.7780-1-baolex.ni@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-08-02 at 19:53 +0800, 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 > --- > > static int timeout = 5000; /* in msec ( 5 sec ) */ > -module_param(timeout, int, 0644); > +module_param(timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); To me, 644 is more 'readable', and as for robustness, the meaning of 644 will never change. -Geoff