From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756730AbcHBTBx (ORCPT ); Tue, 2 Aug 2016 15:01:53 -0400 Received: from ares41.inai.de ([46.4.122.207]:37940 "EHLO ares41.inai.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756039AbcHBTBZ (ORCPT ); Tue, 2 Aug 2016 15:01:25 -0400 X-Greylist: delayed 2678 seconds by postgrey-1.27 at vger.kernel.org; Tue, 02 Aug 2016 15:01:24 EDT Date: Tue, 2 Aug 2016 20:07:11 +0200 (CEST) From: Jan Engelhardt To: Baole Ni cc: Linux Networking Developer Mailing List , lvs-devel@vger.kernel.org, Netfilter Developer Mailing List , Linux Kernel Mailing List , chuansheng.liu@intel.com Subject: Re: [PATCH 1116/1285] Replace numeric parameter like 0444 with macro In-Reply-To: <20160802121754.24527-1-baolex.ni@intel.com> Message-ID: References: <20160802121754.24527-1-baolex.ni@intel.com> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 2016-08-02 14:17, 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. > > static int ip_vs_conn_tab_bits = CONFIG_IP_VS_TAB_BITS; >-module_param_named(conn_tab_bits, ip_vs_conn_tab_bits, int, 0444); >+module_param_named(conn_tab_bits, ip_vs_conn_tab_bits, int, S_IRUSR | S_IRGRP | S_IROTH); We have S_IRUGO for this.