Message ID | 20210504123139.45101-1-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | platform/x86: samsung-laptop: set debugfs blobs to read only | expand |
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?
> > 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.
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/
> 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.
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.
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); }
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(-)