All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] This patch fixes the warning generated due to use of symbolic
@ 2021-05-24 15:57 ` Aviral Gupta
  0 siblings, 0 replies; 6+ messages in thread
From: Aviral Gupta @ 2021-05-24 15:57 UTC (permalink / raw)
  To: ulf.hansson, adrian.hunter, axboe, beanhuo, satyat, avri.altman,
	richard.peng, guoqing.jiang
  Cc: Aviral Gupta, linux-kernel, linux-mmc, linux-kernel-mentees

It's better to use octal permissons instead of symbolic ones because  peoples are more
familiar with octal permissons.
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
+	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+			mode = S_IRUGO;

WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
+			mode = S_IRUGO | S_IWUSR;

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+			debugfs_create_file("ext_csd", S_IRUSR, root, card,

Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
---
 drivers/mmc/core/block.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 266d62f9dbc8..1b5b0ad41b28 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2693,7 +2693,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
 	md->force_ro.store = force_ro_store;
 	sysfs_attr_init(&md->force_ro.attr);
 	md->force_ro.attr.name = "force_ro";
-	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
+	md->force_ro.attr.mode = 0644;
 	ret = device_create_file(disk_to_dev(md->disk), &md->force_ro);
 	if (ret)
 		goto force_ro_fail;
@@ -2703,9 +2703,9 @@ static int mmc_add_disk(struct mmc_blk_data *md)
 		umode_t mode;
 
 		if (card->ext_csd.boot_ro_lock & EXT_CSD_BOOT_WP_B_PWR_WP_DIS)
-			mode = S_IRUGO;
+			mode = 0444;
 		else
-			mode = S_IRUGO | S_IWUSR;
+			mode = 0644;
 
 		md->power_ro_lock.show = power_ro_lock_show;
 		md->power_ro_lock.store = power_ro_lock_store;
@@ -2851,7 +2851,7 @@ static int mmc_blk_add_debugfs(struct mmc_card *card, struct mmc_blk_data *md)
 
 	if (mmc_card_mmc(card)) {
 		md->ext_csd_dentry =
-			debugfs_create_file("ext_csd", S_IRUSR, root, card,
+			debugfs_create_file("ext_csd", 0400, root, card,
 					    &mmc_dbg_ext_csd_fops);
 		if (!md->ext_csd_dentry)
 			return -EIO;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] This patch fixes the warning generated due to use of symbolic
@ 2021-05-24 15:57 ` Aviral Gupta
  0 siblings, 0 replies; 6+ messages in thread
From: Aviral Gupta @ 2021-05-24 15:57 UTC (permalink / raw)
  To: ulf.hansson, adrian.hunter, axboe, beanhuo, satyat, avri.altman,
	richard.peng, guoqing.jiang
  Cc: linux-kernel-mentees, linux-mmc, linux-kernel

It's better to use octal permissons instead of symbolic ones because  peoples are more
familiar with octal permissons.
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
+	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+			mode = S_IRUGO;

WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
+			mode = S_IRUGO | S_IWUSR;

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+			debugfs_create_file("ext_csd", S_IRUSR, root, card,

Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
---
 drivers/mmc/core/block.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 266d62f9dbc8..1b5b0ad41b28 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2693,7 +2693,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
 	md->force_ro.store = force_ro_store;
 	sysfs_attr_init(&md->force_ro.attr);
 	md->force_ro.attr.name = "force_ro";
-	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
+	md->force_ro.attr.mode = 0644;
 	ret = device_create_file(disk_to_dev(md->disk), &md->force_ro);
 	if (ret)
 		goto force_ro_fail;
@@ -2703,9 +2703,9 @@ static int mmc_add_disk(struct mmc_blk_data *md)
 		umode_t mode;
 
 		if (card->ext_csd.boot_ro_lock & EXT_CSD_BOOT_WP_B_PWR_WP_DIS)
-			mode = S_IRUGO;
+			mode = 0444;
 		else
-			mode = S_IRUGO | S_IWUSR;
+			mode = 0644;
 
 		md->power_ro_lock.show = power_ro_lock_show;
 		md->power_ro_lock.store = power_ro_lock_store;
@@ -2851,7 +2851,7 @@ static int mmc_blk_add_debugfs(struct mmc_card *card, struct mmc_blk_data *md)
 
 	if (mmc_card_mmc(card)) {
 		md->ext_csd_dentry =
-			debugfs_create_file("ext_csd", S_IRUSR, root, card,
+			debugfs_create_file("ext_csd", 0400, root, card,
 					    &mmc_dbg_ext_csd_fops);
 		if (!md->ext_csd_dentry)
 			return -EIO;
-- 
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] This patch fixes the warning generated due to use of symbolic
  2021-05-24 15:57 ` Aviral Gupta
@ 2021-05-24 16:07   ` Greg KH
  -1 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-05-24 16:07 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: ulf.hansson, adrian.hunter, axboe, beanhuo, satyat, avri.altman,
	richard.peng, guoqing.jiang, linux-kernel-mentees, linux-mmc,
	linux-kernel

On Mon, May 24, 2021 at 09:27:06PM +0530, Aviral Gupta wrote:
> It's better to use octal permissons instead of symbolic ones because  peoples are more
> familiar with octal permissons.
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
> +	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +			mode = S_IRUGO;
> 
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
> +			mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
> +			debugfs_create_file("ext_csd", S_IRUSR, root, card,
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  drivers/mmc/core/block.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] This patch fixes the warning generated due to use of symbolic
@ 2021-05-24 16:07   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-05-24 16:07 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: axboe, richard.peng, ulf.hansson, linux-kernel, linux-mmc,
	adrian.hunter, guoqing.jiang, satyat, avri.altman,
	linux-kernel-mentees, beanhuo

On Mon, May 24, 2021 at 09:27:06PM +0530, Aviral Gupta wrote:
> It's better to use octal permissons instead of symbolic ones because  peoples are more
> familiar with octal permissons.
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
> +	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +			mode = S_IRUGO;
> 
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
> +			mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
> +			debugfs_create_file("ext_csd", S_IRUSR, root, card,
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  drivers/mmc/core/block.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] This patch fixes the warning generated due to use of symbolic
  2021-05-24 15:57 ` Aviral Gupta
@ 2021-05-24 16:19   ` Pavel Skripkin
  -1 siblings, 0 replies; 6+ messages in thread
From: Pavel Skripkin @ 2021-05-24 16:19 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: ulf.hansson, adrian.hunter, axboe, beanhuo, satyat, avri.altman,
	richard.peng, guoqing.jiang, linux-kernel-mentees, linux-mmc,
	linux-kernel

On Mon, 24 May 2021 21:27:06 +0530
Aviral Gupta <shiv14112001@gmail.com> wrote:

> It's better to use octal permissons instead of symbolic ones because
> peoples are more familiar with octal permissons.
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred.
> Consider using octal permissions '0644'.
> +	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
> using octal permissions '0444'.
> +			mode = S_IRUGO;
> 
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred.
> Consider using octal permissions '0644'.
> +			mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider
> using octal permissions '0400'.
> +			debugfs_create_file("ext_csd", S_IRUSR,
> root, card,
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  drivers/mmc/core/block.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Hi, Aviral!

I guess, you missed my and Greg's mails last time... 

Anyway, subject line is strange, it should be smth like "mmc: core:
fix symbolic permissions".

Please, refer to
https://www.kernel.org/doc/html/latest/process/submitting-patches.html.


With regards,
Pavel Skripkin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] This patch fixes the warning generated due to use of symbolic
@ 2021-05-24 16:19   ` Pavel Skripkin
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Skripkin @ 2021-05-24 16:19 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: axboe, richard.peng, ulf.hansson, linux-kernel, linux-mmc,
	adrian.hunter, guoqing.jiang, satyat, avri.altman,
	linux-kernel-mentees, beanhuo

On Mon, 24 May 2021 21:27:06 +0530
Aviral Gupta <shiv14112001@gmail.com> wrote:

> It's better to use octal permissons instead of symbolic ones because
> peoples are more familiar with octal permissons.
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred.
> Consider using octal permissions '0644'.
> +	md->force_ro.attr.mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
> using octal permissions '0444'.
> +			mode = S_IRUGO;
> 
> WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred.
> Consider using octal permissions '0644'.
> +			mode = S_IRUGO | S_IWUSR;
> 
> WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider
> using octal permissions '0400'.
> +			debugfs_create_file("ext_csd", S_IRUSR,
> root, card,
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  drivers/mmc/core/block.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Hi, Aviral!

I guess, you missed my and Greg's mails last time... 

Anyway, subject line is strange, it should be smth like "mmc: core:
fix symbolic permissions".

Please, refer to
https://www.kernel.org/doc/html/latest/process/submitting-patches.html.


With regards,
Pavel Skripkin
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-24 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 15:57 [PATCH] This patch fixes the warning generated due to use of symbolic Aviral Gupta
2021-05-24 15:57 ` Aviral Gupta
2021-05-24 16:07 ` Greg KH
2021-05-24 16:07   ` Greg KH
2021-05-24 16:19 ` Pavel Skripkin
2021-05-24 16:19   ` Pavel Skripkin

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.