From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935646AbcHBQ4z (ORCPT ); Tue, 2 Aug 2016 12:56:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:4033 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933055AbcHBMAD (ORCPT ); Tue, 2 Aug 2016 08:00:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,460,1464678000"; d="scan'208";a="1006940038" From: Baole Ni To: mchehab@kernel.org, maurochehab@gmail.com, mchehab@infradead.org, mchehab@redhat.com, m.chehab@samsung.com, hverkuil@xs4all.nl, a.hajda@samsung.com, bp@alien8.de Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, hans.verkuil@cisco.com, arnd@arndb.de, geliangtang@163.com, hdegoede@redhat.com, elfring@users.sourceforge.net, chuansheng.liu@intel.com, baolex.ni@intel.com Subject: [PATCH 0444/1285] Replace numeric parameter like 0444 with macro Date: Tue, 2 Aug 2016 19:12:31 +0800 Message-Id: <20160802111231.11471-1-baolex.ni@intel.com> X-Mailer: git-send-email 2.9.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/media/pci/bt8xx/bttv-driver.c | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index df54e17..9353226 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -107,37 +107,37 @@ static unsigned int coring; static unsigned int v4l2 = 1; /* insmod args */ -module_param(bttv_verbose, int, 0644); -module_param(bttv_gpio, int, 0644); -module_param(bttv_debug, int, 0644); -module_param(irq_debug, int, 0644); -module_param(debug_latency, int, 0644); -module_param(disable_ir, int, 0444); - -module_param(fdsr, int, 0444); -module_param(gbuffers, int, 0444); -module_param(gbufsize, int, 0444); -module_param(reset_crop, int, 0444); - -module_param(v4l2, int, 0644); -module_param(bigendian, int, 0644); -module_param(irq_iswitch, int, 0644); -module_param(combfilter, int, 0444); -module_param(lumafilter, int, 0444); -module_param(automute, int, 0444); -module_param(chroma_agc, int, 0444); -module_param(agc_crush, int, 0444); -module_param(whitecrush_upper, int, 0444); -module_param(whitecrush_lower, int, 0444); -module_param(vcr_hack, int, 0444); -module_param(uv_ratio, int, 0444); -module_param(full_luma_range, int, 0444); -module_param(coring, int, 0444); - -module_param_array(radio, int, NULL, 0444); -module_param_array(video_nr, int, NULL, 0444); -module_param_array(radio_nr, int, NULL, 0444); -module_param_array(vbi_nr, int, NULL, 0444); +module_param(bttv_verbose, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(bttv_gpio, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(bttv_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(irq_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(debug_latency, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(disable_ir, int, S_IRUSR | S_IRGRP | S_IROTH); + +module_param(fdsr, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(gbuffers, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(gbufsize, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(reset_crop, int, S_IRUSR | S_IRGRP | S_IROTH); + +module_param(v4l2, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(bigendian, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(irq_iswitch, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(combfilter, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(lumafilter, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(automute, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(chroma_agc, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(agc_crush, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(whitecrush_upper, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(whitecrush_lower, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(vcr_hack, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(uv_ratio, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(full_luma_range, int, S_IRUSR | S_IRGRP | S_IROTH); +module_param(coring, int, S_IRUSR | S_IRGRP | S_IROTH); + +module_param_array(radio, int, NULL, S_IRUSR | S_IRGRP | S_IROTH); +module_param_array(video_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH); +module_param_array(radio_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH); +module_param_array(vbi_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(radio, "The TV card supports radio, default is 0 (no)"); MODULE_PARM_DESC(bigendian, "byte order of the framebuffer, default is native endian"); -- 2.9.2