All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Mamta Shukla <mamtashukla555@gmail.com>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.com,
	rspringer@google.com, toddpoynor@google.com,
	benchan@chromium.org
Subject: Re: [PATCH] staging: gasket: Replace symbolic permissions with octal permissions
Date: Tue, 9 Oct 2018 14:55:46 +0200	[thread overview]
Message-ID: <20181009125546.GA2700@kroah.com> (raw)
In-Reply-To: <20181006143316.GA23864@armorer>

On Sat, Oct 06, 2018 at 08:03:16PM +0530, Mamta Shukla wrote:
> Use octal permissions in place of symbolic permissions to fix checkpatch
> warning.
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
> using octal permissions '0444'.
> 
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> ---
>  drivers/staging/gasket/gasket_sysfs.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/gasket/gasket_sysfs.h b/drivers/staging/gasket/gasket_sysfs.h
> index f32eaf8..8b563d2 100644
> --- a/drivers/staging/gasket/gasket_sysfs.h
> +++ b/drivers/staging/gasket/gasket_sysfs.h
> @@ -40,7 +40,7 @@
>   */
>  #define GASKET_END_OF_ATTR_ARRAY                                               \
>  	{                                                                      \
> -		.attr = __ATTR(GASKET_ARRAY_END_TOKEN, S_IRUGO, NULL, NULL),   \
> +		.attr = __ATTR(GASKET_ARRAY_END_TOKEN, 0444, NULL, NULL),   \

This is very odd, why is this define even needed?

>  		.data.attr_type = 0,                                           \
>  	}
>  
> @@ -75,7 +75,7 @@ struct gasket_sysfs_attribute {
>  
>  #define GASKET_SYSFS_RO(_name, _show_function, _attr_type)                     \
>  	{                                                                      \
> -		.attr = __ATTR(_name, S_IRUGO, _show_function, NULL),          \
> +		.attr = __ATTR(_name, 0444, _show_function, NULL),          \

This should use __ATTR_RO() instead, right?

thanks,

greg k-h


  parent reply	other threads:[~2018-10-09 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 14:33 [PATCH] staging: gasket: Replace symbolic permissions with octal permissions Mamta Shukla
2018-10-06 17:52 ` [Outreachy kernel] " Himanshu Jha
2018-10-09 12:55 ` Greg KH [this message]
2018-10-10 13:10   ` Mamta Shukla
2018-10-10 13:27     ` Greg KH
2019-03-01  8:12 [PATCH] Staging: " Wentao Cai
2019-03-01  8:19 ` Greg Kroah-Hartman
2019-03-01  9:25   ` etsai042
2019-03-13  8:50   ` Wentao Cai
2019-04-10 10:28 [PATCH] staging: gasket: replace " Himadri Pandya
2019-04-16 11:18 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181009125546.GA2700@kroah.com \
    --to=greg@kroah.com \
    --cc=benchan@chromium.org \
    --cc=gregkh@linuxfoundation.com \
    --cc=mamtashukla555@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.