hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/mali_kbase_regs_history_debugfs.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2014, 2016, 2019-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2014, 2016, 2019-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -36,7 +36,7 @@
3636 * If resizing fails for any reason (e.g., could not allocate memory, invalid
3737 * buffer size) then the original buffer will be kept intact.
3838 *
39
- * @return 0 if the buffer was resized, failure otherwise
39
+ * Return: 0 if the buffer was resized, failure otherwise
4040 */
4141 static int kbase_io_history_resize(struct kbase_io_history *h, u16 new_size)
4242 {
....@@ -158,12 +158,8 @@
158158 return kbase_io_history_resize(h, (u16)val);
159159 }
160160
161
-
162
-DEFINE_SIMPLE_ATTRIBUTE(regs_history_size_fops,
163
- regs_history_size_get,
164
- regs_history_size_set,
165
- "%llu\n");
166
-
161
+DEFINE_DEBUGFS_ATTRIBUTE(regs_history_size_fops, regs_history_size_get, regs_history_size_set,
162
+ "%llu\n");
167163
168164 /**
169165 * regs_history_show - show callback for the register access history file.
....@@ -173,8 +169,7 @@
173169 *
174170 * This function is called to dump all recent accesses to the GPU registers.
175171 *
176
- * @return 0 if successfully prints data in debugfs entry file, failure
177
- * otherwise
172
+ * Return: 0 if successfully prints data in debugfs entry file, failure otherwise
178173 */
179174 static int regs_history_show(struct seq_file *sfile, void *data)
180175 {
....@@ -214,7 +209,7 @@
214209 * @in: &struct inode pointer
215210 * @file: &struct file pointer
216211 *
217
- * @return file descriptor
212
+ * Return: file descriptor
218213 */
219214 static int regs_history_open(struct inode *in, struct file *file)
220215 {
....@@ -231,13 +226,13 @@
231226
232227 void kbasep_regs_history_debugfs_init(struct kbase_device *kbdev)
233228 {
234
- debugfs_create_bool("regs_history_enabled", S_IRUGO | S_IWUSR,
229
+ debugfs_create_bool("regs_history_enabled", 0644,
235230 kbdev->mali_debugfs_directory,
236231 &kbdev->io_history.enabled);
237
- debugfs_create_file("regs_history_size", S_IRUGO | S_IWUSR,
232
+ debugfs_create_file("regs_history_size", 0644,
238233 kbdev->mali_debugfs_directory,
239234 &kbdev->io_history, &regs_history_size_fops);
240
- debugfs_create_file("regs_history", S_IRUGO,
235
+ debugfs_create_file("regs_history", 0444,
241236 kbdev->mali_debugfs_directory, &kbdev->io_history,
242237 &regs_history_fops);
243238 }