lkml.org 
[lkml]   [2023]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 1/7] drm/debugfs: create device-centered debugfs functions
Date
On Mon, 19 Dec 2022, Maíra Canal <mcanal@igalia.com> wrote:
> @@ -230,6 +247,12 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
> if (dev->driver->debugfs_init)
> dev->driver->debugfs_init(minor);
>
> + list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) {
> + debugfs_create_file(entry->file.name, S_IFREG | S_IRUGO,

I know this was merged already, but S_IFREG is redundant, and the octal
values are preferred over S_IRUGO. See checkpatch SYMBOLIC_PERMS.

This would be just 0444.


BR,
Jani.


> + minor->debugfs_root, entry, &drm_debugfs_entry_fops);
> + list_del(&entry->list);
> + }
> +
> return 0;
> }
>

--
Jani Nikula, Intel Open Source Graphics Center

\
 
 \ /
  Last update: 2023-03-26 23:28    [W:0.081 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site