All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2] Staging: gasket: Replaces symbolic permissions
Date: Sat, 23 Feb 2019 08:56:41 +0100	[thread overview]
Message-ID: <20190223075641.GB2640@kroah.com> (raw)
In-Reply-To: <20190223055207.3792-1-bhanusreemahesh@gmail.com>

On Sat, Feb 23, 2019 at 11:22:07AM +0530, Bhanusree Pola wrote:
> Replaces Symbolic Permissions with Octal Permission which solves the
> checkpatch.pl warning:
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> 
> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
> ---
> 
> v2: Subject line modified
> 
>  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 151e8edd28ea..60590ea4b760 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),   \

The trailing "\" is now messed up :(

But, as I have said before when people try to fix this up, this whole
macro is not needed at all.  Please just remove it and use the proper
logic in the code.

>  		.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),          \

Trailing \ is not aligned here either.

Also, this should be using __ATTR_RO(), right?

thanks,

greg k-h


  reply	other threads:[~2019-02-23  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23  5:52 [PATCH v2] Staging: gasket: Replaces symbolic permissions Bhanusree Pola
2019-02-23  7:56 ` Greg Kroah-Hartman [this message]
2019-02-23  8:42   ` [Outreachy kernel] " Greg Kroah-Hartman
2019-02-23  9:34     ` Bhanusree Mahesh
2019-02-23  9:51       ` Greg Kroah-Hartman

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=20190223075641.GB2640@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhanusreemahesh@gmail.com \
    --cc=outreachy-kernel@googlegroups.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.