linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: block: Use octal for file permissions
@ 2023-10-19 19:57 Edson Juliano Drosdeck
  2023-10-23 11:42 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Edson Juliano Drosdeck @ 2023-10-19 19:57 UTC (permalink / raw)
  To: ulf.hansson
  Cc: adrian.hunter, CLoehle, brauner, axboe, victor.shih, f.fainelli,
	asuk4.q, yibin.ding, linux-mmc, linux-kernel, edson.drosdeck

Octal permissions are preferred as stated in
Documentation/dev-tools/checkpatch.rst. Replace symbolic permissions
with octal permissions when creating the files.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
---
 drivers/mmc/core/block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index b5b414a71e0b..edb653d8fbfa 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2916,7 +2916,7 @@ static void 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);
 	}
 }
-- 
2.39.2


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

* Re: [PATCH] mmc: block: Use octal for file permissions
  2023-10-19 19:57 [PATCH] mmc: block: Use octal for file permissions Edson Juliano Drosdeck
@ 2023-10-23 11:42 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2023-10-23 11:42 UTC (permalink / raw)
  To: Edson Juliano Drosdeck
  Cc: adrian.hunter, CLoehle, brauner, axboe, victor.shih, f.fainelli,
	asuk4.q, yibin.ding, linux-mmc, linux-kernel

On Thu, 19 Oct 2023 at 21:58, Edson Juliano Drosdeck
<edson.drosdeck@gmail.com> wrote:
>
> Octal permissions are preferred as stated in
> Documentation/dev-tools/checkpatch.rst. Replace symbolic permissions
> with octal permissions when creating the files.
>
> Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>

Thanks for your patch!

Replacing symbolic permissions with octal permissions makes sense to
me. However, I don't want one patch per line that needs to be changed.

Instead, please go over all the files in drivers/mmc/core and fix all
of them in one patch. Another patch can be done for
drivers/mmc/hosts/*

Kind regards
Uffe

> ---
>  drivers/mmc/core/block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index b5b414a71e0b..edb653d8fbfa 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -2916,7 +2916,7 @@ static void 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);
>         }
>  }
> --
> 2.39.2
>

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

end of thread, other threads:[~2023-10-23 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 19:57 [PATCH] mmc: block: Use octal for file permissions Edson Juliano Drosdeck
2023-10-23 11:42 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).