From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757746AbcHCPt4 (ORCPT ); Wed, 3 Aug 2016 11:49:56 -0400 Received: from smtp-out6.electric.net ([192.162.217.186]:63535 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756824AbcHCPty convert rfc822-to-8bit (ORCPT ); Wed, 3 Aug 2016 11:49:54 -0400 From: David Laight To: "'Baole Ni'" , "3chas3@gmail.com" <3chas3@gmail.com>, "tj@kernel.org" , "lenb@kernel.org" , "x86@kernel.org" , "hpa@zytor.com" CC: "linux-atm-general@lists.sourceforge.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "chuansheng.liu@intel.com" Subject: RE: [PATCH 0071/1285] Replace numeric parameter like 0444 with macro Thread-Topic: [PATCH 0071/1285] Replace numeric parameter like 0444 with macro Thread-Index: AQHR7LABgzZmL8COmE6qg25+lK1qI6A3YuuQ Date: Wed, 3 Aug 2016 15:47:14 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F50893F@AcuExch.aculab.com> References: <20160802103831.18486-1-baolex.ni@intel.com> In-Reply-To: <20160802103831.18486-1-baolex.ni@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baole Ni > Sent: 02 August 2016 11:39 > 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. ... > -module_param(debug, ulong, 0644); > +module_param(debug, ulong, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); ... If you're as old as I am the octal constant is easier to read! David