mwifiex: use debugfs_remove_recursive()
PATCH 1/1 mwifiex: use debugfs_remove_recursive()
From: Amitkumar Karwar <[email protected]>
instead of keeping pointers to all entries.
--- drivers/net/wireless/mwifiex/debugfs.c | 36 +++---------------------------- drivers/net/wireless/mwifiex/main.h | 23 -------------------- 2 files changed, 4 insertions(+), 55 deletions(-)
drivers/net/wireless/mwifiex/debugfs.c +4 -32
@@ -2404,14 +2404,9 @@ exit: }#define MWIFIEX_DFS_ADD_FILE (name) do { \ - priv->dfs_##name = \ - debugfs_create_file(#name, 0644, priv->dfs_dev_dir, \ - priv, &mwifiex_dfs_##name##_fops); \ -} while (0); - -#define MWIFIEX_DFS_REM_FILE (name) do { \ - if (priv->dfs_##name) \ - debugfs_remove(priv->dfs_##name); \ + if (!debugfs_create_file(#name, 0644, priv->dfs_dev_dir, \ + priv, &mwifiex_dfs_##name##_fops)) \ + goto exit; \ } while (0);#define MWIFIEX_DFS_FILE_OPS (name) \
@@ -2524,30 +2519,7 @@ mwifiex_dev_debugfs_remove(struct mwifiex_private *priv)if (!priv) goto exit; -MWIFIEX_DFS_REM_FILE (info); -MWIFIEX_DFS_REM_FILE (debug); -MWIFIEX_DFS_REM_FILE (deepsleep); -MWIFIEX_DFS_REM_FILE (hscfg); -MWIFIEX_DFS_REM_FILE (amsduaggrctrl); -MWIFIEX_DFS_REM_FILE (txaggrprio); -MWIFIEX_DFS_REM_FILE (sleeppd); -MWIFIEX_DFS_REM_FILE (mpactrl); -MWIFIEX_DFS_REM_FILE (qoscfg); -MWIFIEX_DFS_REM_FILE (atimwindow); -MWIFIEX_DFS_REM_FILE (txratecfg); -MWIFIEX_DFS_REM_FILE (addbapara); -MWIFIEX_DFS_REM_FILE (addbareject); -MWIFIEX_DFS_REM_FILE (httxcfg); -MWIFIEX_DFS_REM_FILE (htcapinfo); -MWIFIEX_DFS_REM_FILE (getlog); -MWIFIEX_DFS_REM_FILE (antcfg); -MWIFIEX_DFS_REM_FILE (regrdwr); -MWIFIEX_DFS_REM_FILE (rdeeprom); -MWIFIEX_DFS_REM_FILE (drvdbg); -MWIFIEX_DFS_REM_FILE (txbufcfg); -MWIFIEX_DFS_REM_FILE (passphrase); -MWIFIEX_DFS_REM_FILE (esuppmode); -MWIFIEX_DFS_REM_FILE (dev_dir); +debugfs_remove_recursive (priv->dfs_dev_dir); exit:LEAVE (); }
drivers/net/wireless/mwifiex/main.h +0 -23
@@ -419,29 +419,6 @@ struct mwifiex_private {char version_str[128 ];#ifdef CONFIG_DEBUG_FS struct dentry *dfs_dev_dir; -struct dentry *dfs_info; -struct dentry *dfs_debug; -struct dentry *dfs_deepsleep; -struct dentry *dfs_hscfg; -struct dentry *dfs_amsduaggrctrl; -struct dentry *dfs_txaggrprio; -struct dentry *dfs_sleeppd; -struct dentry *dfs_mpactrl; -struct dentry *dfs_qoscfg; -struct dentry *dfs_atimwindow; -struct dentry *dfs_txratecfg; -struct dentry *dfs_addbapara; -struct dentry *dfs_addbareject; -struct dentry *dfs_httxcfg; -struct dentry *dfs_htcapinfo; -struct dentry *dfs_getlog; -struct dentry *dfs_antcfg; -struct dentry *dfs_regrdwr; -struct dentry *dfs_rdeeprom; -struct dentry *dfs_drvdbg; -struct dentry *dfs_txbufcfg; -struct dentry *dfs_passphrase; -struct dentry *dfs_esuppmode;#endif u8 nick_name[16 ];bool is_adhoc_link_sensed;
Signature · 1 line
1.7.0.2
Quoted 6 lines · Bing Zhao
From: Amitkumar Karwar <[email protected]>
instead of keeping pointers to all entries.
Signed-off-by Amitkumar Karwar <[email protected]>Signed-off-by Kiran Divekar <[email protected]>
Just for the record, I'm not tracking any of the mwifiex patches at this time. Are you pushing them to a public git tree?
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Hi John,
Quoted 10 lines
-----Original Message-----
From: John W. Linville [mailto:[email protected]]
Sent: Friday, December 17, 2010 6:27 AM
To: Bing Zhao
Cc: [email protected]; Johannes Berg; Amitkumar Karwar; Kiran Divekar; Frank Huang
Subject: Re: [PATCH] mwifiex: usedebugfs_remove_recursive()Quoted 2 lines · Bing Zhao
From: Amitkumar Karwar <[email protected]>
Quoted 7 lines
Quoted 4 lines
instead of keeping pointers to all entries.
Signed-off-by Amitkumar Karwar <[email protected]>Signed-off-by Kiran Divekar <[email protected]>Just for the record, I'm not tracking any of the mwifiex patches at this time. Are you pushing them to a public git tree?
I have pushed all mwifiex patches to Marvell public git tree:
git://git.marvell.com/mwifiex.git
http://git.marvell.com/?p=mwifiex.git;a=summary
I will let you know as soon as we finish all open items commented by you, Johannes and other reviewers.
Thanks,
Bing
Quoted 5 lines
John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.