From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967313AbcHBOGG (ORCPT ); Tue, 2 Aug 2016 10:06:06 -0400 Received: from ipv4.connman.net ([82.165.8.211]:54533 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967161AbcHBOEW convert rfc822-to-8bit (ORCPT ); Tue, 2 Aug 2016 10:04:22 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH 0984/1285] Replace numeric parameter like 0444 with macro From: Marcel Holtmann In-Reply-To: <87bn1bqns8.fsf@linux.intel.com> Date: Tue, 2 Aug 2016 16:03:59 +0200 Cc: Baole Ni , Greg Kroah-Hartman , m.chehab@samsung.com, Marek Szyprowski , kyungmin.park@samsung.com, k.kozlowski@samsung.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter.chen@freescale.com, mina86@mina86.com, deepa.kernel@gmail.com, mathias.nyman@linux.intel.com, stern@rowland.harvard.edu, chuansheng.liu@intel.com, oneukum@suse.com Content-Transfer-Encoding: 8BIT Message-Id: References: <20160802120521.15675-1-baolex.ni@intel.com> <87bn1bqns8.fsf@linux.intel.com> To: Felipe Balbi X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, >> 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/usb/misc/usbtest.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c >> index 6b978f0..5e81dc3 100644 >> --- a/drivers/usb/misc/usbtest.c >> +++ b/drivers/usb/misc/usbtest.c >> @@ -15,7 +15,7 @@ >> /*-------------------------------------------------------------------------*/ >> >> static int override_alt = -1; >> -module_param_named(alt, override_alt, int, 0644); >> +module_param_named(alt, override_alt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); > > line too long. You need to run this series through scripts/checkpatch.pl please don't give them any ideas. Next thing you know and another 1285 patch bomb is coming our way. Regards Marcel