Skip to content

Commit

Permalink
hsr: use debugfs_remove_recursive() instead of debugfs_remove()
Browse files Browse the repository at this point in the history
If it uses debugfs_remove_recursive() instead of debugfs_remove(),
hsr_priv() doesn't need to have "node_tbl_file" pointer variable.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Taehee Yoo authored and David S. Miller committed Mar 1, 2020
1 parent 892e091 commit f3f2f98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions net/hsr/hsr_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
priv->node_tbl_root = NULL;
return;
}
priv->node_tbl_file = de;
}

/* hsr_debugfs_term - Tear down debugfs intrastructure
Expand All @@ -125,9 +124,7 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
void
hsr_debugfs_term(struct hsr_priv *priv)
{
debugfs_remove(priv->node_tbl_file);
priv->node_tbl_file = NULL;
debugfs_remove(priv->node_tbl_root);
debugfs_remove_recursive(priv->node_tbl_root);
priv->node_tbl_root = NULL;
}

Expand Down
1 change: 0 additions & 1 deletion net/hsr/hsr_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ struct hsr_priv {
unsigned char sup_multicast_addr[ETH_ALEN];
#ifdef CONFIG_DEBUG_FS
struct dentry *node_tbl_root;
struct dentry *node_tbl_file;
#endif
};

Expand Down

0 comments on commit f3f2f98

Please sign in to comment.