From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756038AbdAHLcU (ORCPT ); Sun, 8 Jan 2017 06:32:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56532 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794AbdAHLcH (ORCPT ); Sun, 8 Jan 2017 06:32:07 -0500 Date: Sun, 8 Jan 2017 12:32:27 +0100 From: Greg KH To: Derek Robson Cc: samuel.thibault@ens-lyon.org, w.d.hubbs@gmail.com, chris@the-brannons.com, speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Staging: speakup: styel fix, octal file permissions Message-ID: <20170108113227.GA15820@kroah.com> References: <20170107041116.19787-1-robsonde@gmail.com> <20170107073945.GA17731@kroah.com> <20170108050131.GB1705@bigbird> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170108050131.GB1705@bigbird> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 08, 2017 at 06:01:31PM +1300, Derek Robson wrote: > On Sat, Jan 07, 2017 at 08:39:45AM +0100, Greg KH wrote: > > On Sat, Jan 07, 2017 at 05:11:16PM +1300, Derek Robson wrote: > > > Changed file permission to octal style, > > > Found using checkpatch > > > > Typo in your subject line :( > > > > > > > > Signed-off-by: Derek Robson > > > --- > > > drivers/staging/speakup/kobjects.c | 54 +++++++++++++++++++------------------- > > > 1 file changed, 27 insertions(+), 27 deletions(-) > > > > > > diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c > > > index e744aa9730ff..4e7ebc306488 100644 > > > --- a/drivers/staging/speakup/kobjects.c > > > +++ b/drivers/staging/speakup/kobjects.c > > > @@ -865,66 +865,66 @@ static struct kobj_attribute version_attribute = > > > __ATTR_RO(version); > > > > > > static struct kobj_attribute delimiters_attribute = > > > - __ATTR(delimiters, S_IWUSR | S_IRUGO, punc_show, punc_store); > > > + __ATTR(delimiters, 0644, punc_show, punc_store); > > > static struct kobj_attribute ex_num_attribute = > > > - __ATTR(ex_num, S_IWUSR | S_IRUGO, punc_show, punc_store); > > > + __ATTR(ex_num, 0644, punc_show, punc_store); > > > > Why not just use __ATTR_RW() for all of these instead? Be much easier > > and smaller and is recommended instead of spelling out the mode values > > everywhere. > > It looks like that won't work in this case the handler is reused and not in the standard format of attrName_show. > > Or have I not understood the use of __ATTR_RW() ? Ugh, you are right, nevermind. Please resend this and say why you can't use __ATTR_RW() in the changelog text so I don't ask you again when it's resent :) thanks, greg k-h