hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/wireless/intel/iwlegacy/debug.c
....@@ -1,25 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
3
- * GPL LICENSE SUMMARY
4
- *
54 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of version 2 of the GNU General Public License as
9
- * published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope that it will be useful, but
12
- * WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
19
- * USA
20
- *
21
- * The full GNU General Public License is included in this distribution
22
- * in the file called LICENSE.GPL.
235 *
246 * Contact Information:
257 * Intel Linux Wireless <ilw@linux.intel.com>
....@@ -128,23 +110,12 @@
128110
129111 /* create and remove of files */
130112 #define DEBUGFS_ADD_FILE(name, parent, mode) do { \
131
- if (!debugfs_create_file(#name, mode, parent, il, \
132
- &il_dbgfs_##name##_ops)) \
133
- goto err; \
113
+ debugfs_create_file(#name, mode, parent, il, \
114
+ &il_dbgfs_##name##_ops); \
134115 } while (0)
135116
136117 #define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \
137
- struct dentry *__tmp; \
138
- __tmp = debugfs_create_bool(#name, 0600, parent, ptr); \
139
- if (IS_ERR(__tmp) || !__tmp) \
140
- goto err; \
141
-} while (0)
142
-
143
-#define DEBUGFS_ADD_X32(name, parent, ptr) do { \
144
- struct dentry *__tmp; \
145
- __tmp = debugfs_create_x32(#name, 0600, parent, ptr); \
146
- if (IS_ERR(__tmp) || !__tmp) \
147
- goto err; \
118
+ debugfs_create_bool(#name, 0600, parent, ptr); \
148119 } while (0)
149120
150121 /* file operation */
....@@ -1341,27 +1312,18 @@
13411312 * Create the debugfs files and directories
13421313 *
13431314 */
1344
-int
1315
+void
13451316 il_dbgfs_register(struct il_priv *il, const char *name)
13461317 {
13471318 struct dentry *phyd = il->hw->wiphy->debugfsdir;
13481319 struct dentry *dir_drv, *dir_data, *dir_rf, *dir_debug;
13491320
13501321 dir_drv = debugfs_create_dir(name, phyd);
1351
- if (!dir_drv)
1352
- return -ENOMEM;
1353
-
13541322 il->debugfs_dir = dir_drv;
13551323
13561324 dir_data = debugfs_create_dir("data", dir_drv);
1357
- if (!dir_data)
1358
- goto err;
13591325 dir_rf = debugfs_create_dir("rf", dir_drv);
1360
- if (!dir_rf)
1361
- goto err;
13621326 dir_debug = debugfs_create_dir("debug", dir_drv);
1363
- if (!dir_debug)
1364
- goto err;
13651327
13661328 DEBUGFS_ADD_FILE(nvm, dir_data, 0400);
13671329 DEBUGFS_ADD_FILE(sram, dir_data, 0600);
....@@ -1399,18 +1361,11 @@
13991361 DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf,
14001362 &il->disable_chain_noise_cal);
14011363 DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, &il->disable_tx_power_cal);
1402
- return 0;
1403
-
1404
-err:
1405
- IL_ERR("Can't create the debugfs directory\n");
1406
- il_dbgfs_unregister(il);
1407
- return -ENOMEM;
14081364 }
14091365 EXPORT_SYMBOL(il_dbgfs_register);
14101366
1411
-/**
1367
+/*
14121368 * Remove the debugfs files and directories
1413
- *
14141369 */
14151370 void
14161371 il_dbgfs_unregister(struct il_priv *il)