hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/scsi/qedi/qedi_debugfs.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * QLogic iSCSI Offload Driver
34 * Copyright (c) 2016 Cavium Inc.
4
- *
5
- * This software is available under the terms of the GNU General Public License
6
- * (GPL) Version 2, available from the file COPYING in the main directory of
7
- * this source tree.
85 */
96
107 #include "qedi.h"
....@@ -23,27 +20,16 @@
2320 const struct file_operations *fops)
2421 {
2522 char host_dirname[32];
26
- struct dentry *file_dentry = NULL;
2723
2824 sprintf(host_dirname, "host%u", qedi->host_no);
2925 qedi->bdf_dentry = debugfs_create_dir(host_dirname, qedi_dbg_root);
30
- if (!qedi->bdf_dentry)
31
- return;
3226
3327 while (dops) {
3428 if (!(dops->name))
3529 break;
3630
37
- file_dentry = debugfs_create_file(dops->name, 0600,
38
- qedi->bdf_dentry, qedi,
39
- fops);
40
- if (!file_dentry) {
41
- QEDI_INFO(qedi, QEDI_LOG_DEBUGFS,
42
- "Debugfs entry %s creation failed\n",
43
- dops->name);
44
- debugfs_remove_recursive(qedi->bdf_dentry);
45
- return;
46
- }
31
+ debugfs_create_file(dops->name, 0600, qedi->bdf_dentry, qedi,
32
+ fops);
4733 dops++;
4834 fops++;
4935 }
....@@ -60,8 +46,6 @@
6046 qedi_dbg_init(char *drv_name)
6147 {
6248 qedi_dbg_root = debugfs_create_dir(drv_name, NULL);
63
- if (!qedi_dbg_root)
64
- QEDI_INFO(NULL, QEDI_LOG_DEBUGFS, "Init of debugfs failed\n");
6549 }
6650
6751 void