From: Taehee Yoo Date: Fri, 28 Feb 2020 18:01:20 +0000 (+0000) Subject: hsr: use debugfs_remove_recursive() instead of debugfs_remove() X-Git-Tag: v5.15~4200^2~283^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3f2f98470b7b8ead7c364c103303c3cac8c2ff0;p=platform%2Fkernel%2Flinux-starfive.git hsr: use debugfs_remove_recursive() instead of debugfs_remove() 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 Signed-off-by: David S. Miller --- diff --git a/net/hsr/hsr_debugfs.c b/net/hsr/hsr_debugfs.c index d5f709b..9787ef1 100644 --- a/net/hsr/hsr_debugfs.c +++ b/net/hsr/hsr_debugfs.c @@ -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 @@ -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; } diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h index 754d84b..7321cf8 100644 --- a/net/hsr/hsr_main.h +++ b/net/hsr/hsr_main.h @@ -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 };