hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/arch/mips/cavium-octeon/oct_ilm.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/fs.h>
23 #include <linux/interrupt.h>
34 #include <asm/octeon/octeon.h>
....@@ -63,31 +64,11 @@
6364
6465 DEFINE_SIMPLE_ATTRIBUTE(reset_statistics_ops, NULL, reset_statistics, "%llu\n");
6566
66
-static int init_debufs(void)
67
+static void init_debugfs(void)
6768 {
68
- struct dentry *show_dentry;
6969 dir = debugfs_create_dir("oct_ilm", 0);
70
- if (!dir) {
71
- pr_err("oct_ilm: failed to create debugfs entry oct_ilm\n");
72
- return -1;
73
- }
74
-
75
- show_dentry = debugfs_create_file("statistics", 0222, dir, NULL,
76
- &oct_ilm_ops);
77
- if (!show_dentry) {
78
- pr_err("oct_ilm: failed to create debugfs entry oct_ilm/statistics\n");
79
- return -1;
80
- }
81
-
82
- show_dentry = debugfs_create_file("reset", 0222, dir, NULL,
83
- &reset_statistics_ops);
84
- if (!show_dentry) {
85
- pr_err("oct_ilm: failed to create debugfs entry oct_ilm/reset\n");
86
- return -1;
87
- }
88
-
89
- return 0;
90
-
70
+ debugfs_create_file("statistics", 0222, dir, NULL, &oct_ilm_ops);
71
+ debugfs_create_file("reset", 0222, dir, NULL, &reset_statistics_ops);
9172 }
9273
9374 static void init_latency_info(struct latency_info *li, int startup)
....@@ -169,11 +150,7 @@
169150 int rc;
170151 int irq = OCTEON_IRQ_TIMER0 + TIMER_NUM;
171152
172
- rc = init_debufs();
173
- if (rc) {
174
- WARN(1, "Could not create debugfs entries");
175
- return rc;
176
- }
153
+ init_debugfs();
177154
178155 rc = request_irq(irq, cvm_oct_ciu_timer_interrupt, IRQF_NO_THREAD,
179156 "oct_ilm", 0);