[PATCH v4 1/7] drm/debugfs: create device-centered debugfs functions
Jani Nikula
jani.nikula at linux.intel.com
Thu Jan 5 12:44:14 UTC 2023
On Mon, 19 Dec 2022, Maíra Canal <mcanal at 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
More information about the dri-devel
mailing list