linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
@ 2021-05-04 12:31 Wolfram Sang
  2021-05-04 12:40 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2021-05-04 12:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Corentin Chary, Hans de Goede, Mark Gross,
	platform-driver-x86

Those blobs can only be read. So, don't confuse users with 'writable'
flags.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Found while working with blobs myself. I don't have the HW.

 drivers/platform/x86/samsung-laptop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index d5cec6e35bb8..7e1dedde6dab 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -1301,13 +1301,13 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung)
 			   &samsung->debug.data.d2);
 	debugfs_create_u8("d3", S_IRUGO | S_IWUSR, root,
 			  &samsung->debug.data.d3);
-	debugfs_create_blob("data", S_IRUGO | S_IWUSR, root,
+	debugfs_create_blob("data", S_IRUGO, root,
 			    &samsung->debug.data_wrapper);
-	debugfs_create_blob("f0000_segment", S_IRUSR | S_IWUSR, root,
+	debugfs_create_blob("f0000_segment", S_IRUSR, root,
 			    &samsung->debug.f0000_wrapper);
 	debugfs_create_file("call", S_IFREG | S_IRUGO, root, samsung,
 			    &samsung_laptop_call_fops);
-	debugfs_create_blob("sdiag", S_IRUGO | S_IWUSR, root,
+	debugfs_create_blob("sdiag", S_IRUGO, root,
 			    &samsung->debug.sdiag_wrapper);
 }
 
-- 
2.30.0


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

* Re: [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 12:31 [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
@ 2021-05-04 12:40 ` Andy Shevchenko
  2021-05-04 12:51   ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2021-05-04 12:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 3:32 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Those blobs can only be read. So, don't confuse users with 'writable'
> flags.

Wouldn't it make sense at the same time to convert ugly namings to
octal permissions?

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 12:40 ` Andy Shevchenko
@ 2021-05-04 12:51   ` Wolfram Sang
  2021-05-04 13:09     ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2021-05-04 12:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]


> > Those blobs can only be read. So, don't confuse users with 'writable'
> > flags.
> 
> Wouldn't it make sense at the same time to convert ugly namings to
> octal permissions?

I think this is out-of-scpoe for this patch. While I also use octals
personally, I don't feel strongly about it and let others use what they
prefer.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 12:51   ` Wolfram Sang
@ 2021-05-04 13:09     ` Andy Shevchenko
  2021-05-04 13:17       ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2021-05-04 13:09 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 3:51 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > Those blobs can only be read. So, don't confuse users with 'writable'
> > > flags.
> >
> > Wouldn't it make sense at the same time to convert ugly namings to
> > octal permissions?
>
> I think this is out-of-scpoe for this patch. While I also use octals
> personally, I don't feel strongly about it and let others use what they
> prefer.

Linus has (had?) a strong opinion about it. My point is to reduce the
churn since two patches fixing the very same parameter in a row seems
too much to me.
https://lwn.net/Articles/696227/

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 13:09     ` Andy Shevchenko
@ 2021-05-04 13:17       ` Wolfram Sang
  2021-05-04 15:05         ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2021-05-04 13:17 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]


> Linus has (had?) a strong opinion about it. My point is to reduce the

OK, I see. Thanks for the pointer!

> churn since two patches fixing the very same parameter in a row seems
> too much to me.

I'd still prefer that and having a seperate patch fixing the whole
driver. IMO better than having a mixture of octals and defines.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only
  2021-05-04 13:17       ` Wolfram Sang
@ 2021-05-04 15:05         ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-05-04 15:05 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux Kernel Mailing List, Corentin Chary, Hans de Goede,
	Mark Gross, Platform Driver

On Tue, May 4, 2021 at 4:17 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
>
> > Linus has (had?) a strong opinion about it. My point is to reduce the
>
> OK, I see. Thanks for the pointer!
>
> > churn since two patches fixing the very same parameter in a row seems
> > too much to me.
>
> I'd still prefer that and having a seperate patch fixing the whole
> driver. IMO better than having a mixture of octals and defines.

You can convert the rest as well. And point out that only blobs are RO.
Whatever, the main idea is to do both things either with one patch or
two in a series at the same time.

-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2021-05-04 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 12:31 [PATCH] platform/x86: samsung-laptop: set debugfs blobs to read only Wolfram Sang
2021-05-04 12:40 ` Andy Shevchenko
2021-05-04 12:51   ` Wolfram Sang
2021-05-04 13:09     ` Andy Shevchenko
2021-05-04 13:17       ` Wolfram Sang
2021-05-04 15:05         ` Andy Shevchenko

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