summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2019-04-15 11:36:01 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-15 20:22:01 -0400
commit9c5f8a19b2de2860d4b7764204c52832ac0f4440 (patch)
tree30232de82c7b3dd5f825ff4341229a4049745aa8
parentdcdecdcfe1fc39ded8590aed2fe84d62f14b2392 (diff)
net: hsr: fix naming of file and functions
Fix the file name and functions to match with existing implementation. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/hsr/Makefile2
-rw-r--r--net/hsr/hsr_debugfs.c (renamed from net/hsr/hsr_prp_debugfs.c)34
-rw-r--r--net/hsr/hsr_device.c4
-rw-r--r--net/hsr/hsr_main.h8
4 files changed, 24 insertions, 24 deletions
diff --git a/net/hsr/Makefile b/net/hsr/Makefile
index d74d89d013b0..e45757fc477f 100644
--- a/net/hsr/Makefile
+++ b/net/hsr/Makefile
@@ -6,4 +6,4 @@ obj-$(CONFIG_HSR) += hsr.o
6 6
7hsr-y := hsr_main.o hsr_framereg.o hsr_device.o \ 7hsr-y := hsr_main.o hsr_framereg.o hsr_device.o \
8 hsr_netlink.o hsr_slave.o hsr_forward.o 8 hsr_netlink.o hsr_slave.o hsr_forward.o
9hsr-$(CONFIG_DEBUG_FS) += hsr_prp_debugfs.o 9hsr-$(CONFIG_DEBUG_FS) += hsr_debugfs.o
diff --git a/net/hsr/hsr_prp_debugfs.c b/net/hsr/hsr_debugfs.c
index b30e98734c61..b5a955013976 100644
--- a/net/hsr/hsr_prp_debugfs.c
+++ b/net/hsr/hsr_debugfs.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * hsr_prp_debugfs code 2 * hsr_debugfs code
3 * Copyright (C) 2017 Texas Instruments Incorporated 3 * Copyright (C) 2017 Texas Instruments Incorporated
4 * 4 *
5 * Author(s): 5 * Author(s):
@@ -26,9 +26,9 @@ static void print_mac_address(struct seq_file *sfp, unsigned char *mac)
26 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 26 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
27} 27}
28 28
29/* hsr_prp_node_table_show - Formats and prints node_table entries */ 29/* hsr_node_table_show - Formats and prints node_table entries */
30static int 30static int
31hsr_prp_node_table_show(struct seq_file *sfp, void *data) 31hsr_node_table_show(struct seq_file *sfp, void *data)
32{ 32{
33 struct hsr_priv *priv = (struct hsr_priv *)sfp->private; 33 struct hsr_priv *priv = (struct hsr_priv *)sfp->private;
34 struct hsr_node *node; 34 struct hsr_node *node;
@@ -52,40 +52,40 @@ hsr_prp_node_table_show(struct seq_file *sfp, void *data)
52 return 0; 52 return 0;
53} 53}
54 54
55/* hsr_prp_node_table_open - Open the node_table file 55/* hsr_node_table_open - Open the node_table file
56 * 56 *
57 * Description: 57 * Description:
58 * This routine opens a debugfs file node_table of specific hsr device 58 * This routine opens a debugfs file node_table of specific hsr device
59 */ 59 */
60static int 60static int
61hsr_prp_node_table_open(struct inode *inode, struct file *filp) 61hsr_node_table_open(struct inode *inode, struct file *filp)
62{ 62{
63 return single_open(filp, hsr_prp_node_table_show, inode->i_private); 63 return single_open(filp, hsr_node_table_show, inode->i_private);
64} 64}
65 65
66static const struct file_operations hsr_prp_fops = { 66static const struct file_operations hsr_fops = {
67 .owner = THIS_MODULE, 67 .owner = THIS_MODULE,
68 .open = hsr_prp_node_table_open, 68 .open = hsr_node_table_open,
69 .read = seq_read, 69 .read = seq_read,
70 .llseek = seq_lseek, 70 .llseek = seq_lseek,
71 .release = single_release, 71 .release = single_release,
72}; 72};
73 73
74/* hsr_prp_debugfs_init - create hsr-prp node_table file for dumping 74/* hsr_debugfs_init - create hsr node_table file for dumping
75 * the node table 75 * the node table
76 * 76 *
77 * Description: 77 * Description:
78 * When debugfs is configured this routine sets up the node_table file per 78 * When debugfs is configured this routine sets up the node_table file per
79 * hsr/prp device for dumping the node_table entries 79 * hsr device for dumping the node_table entries
80 */ 80 */
81int hsr_prp_debugfs_init(struct hsr_priv *priv) 81int hsr_debugfs_init(struct hsr_priv *priv)
82{ 82{
83 int rc = -1; 83 int rc = -1;
84 struct dentry *de = NULL; 84 struct dentry *de = NULL;
85 85
86 de = debugfs_create_dir("hsr", NULL); 86 de = debugfs_create_dir("hsr", NULL);
87 if (!de) { 87 if (!de) {
88 pr_err("Cannot create hsr-prp debugfs root\n"); 88 pr_err("Cannot create hsr debugfs root\n");
89 return rc; 89 return rc;
90 } 90 }
91 91
@@ -93,9 +93,9 @@ int hsr_prp_debugfs_init(struct hsr_priv *priv)
93 93
94 de = debugfs_create_file("node_table", S_IFREG | 0444, 94 de = debugfs_create_file("node_table", S_IFREG | 0444,
95 priv->node_tbl_root, priv, 95 priv->node_tbl_root, priv,
96 &hsr_prp_fops); 96 &hsr_fops);
97 if (!de) { 97 if (!de) {
98 pr_err("Cannot create hsr-prp node_table directory\n"); 98 pr_err("Cannot create hsr node_table directory\n");
99 return rc; 99 return rc;
100 } 100 }
101 priv->node_tbl_file = de; 101 priv->node_tbl_file = de;
@@ -104,14 +104,14 @@ int hsr_prp_debugfs_init(struct hsr_priv *priv)
104 return rc; 104 return rc;
105} 105}
106 106
107/* hsr_prp_debugfs_term - Tear down debugfs intrastructure 107/* hsr_debugfs_term - Tear down debugfs intrastructure
108 * 108 *
109 * Description: 109 * Description:
110 * When Debufs is configured this routine removes debugfs file system 110 * When Debufs is configured this routine removes debugfs file system
111 * elements that are specific to hsr-prp 111 * elements that are specific to hsr
112 */ 112 */
113void 113void
114hsr_prp_debugfs_term(struct hsr_priv *priv) 114hsr_debugfs_term(struct hsr_priv *priv)
115{ 115{
116 debugfs_remove(priv->node_tbl_file); 116 debugfs_remove(priv->node_tbl_file);
117 priv->node_tbl_file = NULL; 117 priv->node_tbl_file = NULL;
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index b47a621e3f4e..58cf500ebf94 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -354,7 +354,7 @@ static void hsr_dev_destroy(struct net_device *hsr_dev)
354 354
355 hsr = netdev_priv(hsr_dev); 355 hsr = netdev_priv(hsr_dev);
356 356
357 hsr_prp_debugfs_term(hsr); 357 hsr_debugfs_term(hsr);
358 358
359 rtnl_lock(); 359 rtnl_lock();
360 hsr_for_each_port(hsr, port) 360 hsr_for_each_port(hsr, port)
@@ -485,7 +485,7 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
485 goto fail; 485 goto fail;
486 486
487 mod_timer(&hsr->prune_timer, jiffies + msecs_to_jiffies(PRUNE_PERIOD)); 487 mod_timer(&hsr->prune_timer, jiffies + msecs_to_jiffies(PRUNE_PERIOD));
488 res = hsr_prp_debugfs_init(hsr); 488 res = hsr_debugfs_init(hsr);
489 if (res) 489 if (res)
490 goto fail; 490 goto fail;
491 491
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index 778213f07fe0..6cd4dff58727 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -184,15 +184,15 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
184} 184}
185 185
186#if IS_ENABLED(CONFIG_DEBUG_FS) 186#if IS_ENABLED(CONFIG_DEBUG_FS)
187int hsr_prp_debugfs_init(struct hsr_priv *priv); 187int hsr_debugfs_init(struct hsr_priv *priv);
188void hsr_prp_debugfs_term(struct hsr_priv *priv); 188void hsr_debugfs_term(struct hsr_priv *priv);
189#else 189#else
190static inline int hsr_prp_debugfs_init(struct hsr_priv *priv) 190static inline int hsr_debugfs_init(struct hsr_priv *priv)
191{ 191{
192 return 0; 192 return 0;
193} 193}
194 194
195static inline void hsr_prp_debugfs_term(struct hsr_priv *priv) 195static inline void hsr_debugfs_term(struct hsr_priv *priv)
196{} 196{}
197#endif 197#endif
198 198