forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/arch/powerpc/kvm/timing.c
....@@ -1,16 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License, version 2, as
4
- * published by the Free Software Foundation.
5
- *
6
- * This program is distributed in the hope that it will be useful,
7
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
8
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
- * GNU General Public License for more details.
10
- *
11
- * You should have received a copy of the GNU General Public License
12
- * along with this program; if not, write to the Free Software
13
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
143 *
154 * Copyright IBM Corp. 2008
165 *
....@@ -222,23 +211,14 @@
222211
223212 snprintf(dbg_fname, sizeof(dbg_fname), "vm%u_vcpu%u_timing",
224213 current->pid, id);
225
- debugfs_file = debugfs_create_file(dbg_fname, 0666,
226
- kvm_debugfs_dir, vcpu,
227
- &kvmppc_exit_timing_fops);
228
-
229
- if (!debugfs_file) {
230
- printk(KERN_ERR"%s: error creating debugfs file %s\n",
231
- __func__, dbg_fname);
232
- return;
233
- }
214
+ debugfs_file = debugfs_create_file(dbg_fname, 0666, kvm_debugfs_dir,
215
+ vcpu, &kvmppc_exit_timing_fops);
234216
235217 vcpu->arch.debugfs_exit_timing = debugfs_file;
236218 }
237219
238220 void kvmppc_remove_vcpu_debugfs(struct kvm_vcpu *vcpu)
239221 {
240
- if (vcpu->arch.debugfs_exit_timing) {
241
- debugfs_remove(vcpu->arch.debugfs_exit_timing);
242
- vcpu->arch.debugfs_exit_timing = NULL;
243
- }
222
+ debugfs_remove(vcpu->arch.debugfs_exit_timing);
223
+ vcpu->arch.debugfs_exit_timing = NULL;
244224 }