From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754908AbcHBOOI (ORCPT ); Tue, 2 Aug 2016 10:14:08 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:11080 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965278AbcHBM4y (ORCPT ); Tue, 2 Aug 2016 08:56:54 -0400 X-IronPort-AV: E=Sophos;i="5.28,460,1464645600"; d="scan'208";a="186670729" Date: Tue, 2 Aug 2016 14:47:12 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Baole Ni cc: gregkh@linuxfoundation.org, m.chehab@samsung.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter.senna@gmail.com, akpm@linux-foundation.org, luisbg@osg.samsung.com, Julia.Lawall@lip6.fr, geliangtang@163.com, colin.king@canonical.com, chuansheng.liu@intel.com, oneukum@suse.com Subject: Re: [PATCH 0982/1285] Replace numeric parameter like 0444 with macro In-Reply-To: <20160802120507.15539-1-baolex.ni@intel.com> Message-ID: References: <20160802120507.15539-1-baolex.ni@intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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 Tue, 2 Aug 2016, 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 > --- > drivers/usb/host/fotg210-hcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c > index 66efa9a..7ad395e 100644 > --- a/drivers/usb/host/fotg210-hcd.c > +++ b/drivers/usb/host/fotg210-hcd.c > @@ -4789,7 +4789,7 @@ out_unlock: > return ret; > } > > -static DEVICE_ATTR(uframe_periodic_max, 0644, show_uframe_periodic_max, > +static DEVICE_ATTR(uframe_periodic_max, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, show_uframe_periodic_max, Over 80 chars. julia > store_uframe_periodic_max); > > static inline int create_sysfs_files(struct fotg210_hcd *fotg210) > -- > 2.9.2 > >