Skip to content

Commit 9c5f8a1

Browse files
Murali Karicheridavem330
authored andcommitted
net: hsr: fix naming of file and functions
Fix the file name and functions to match with existing implementation. Signed-off-by: Murali Karicheri <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dcdecdc commit 9c5f8a1

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

net/hsr/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ obj-$(CONFIG_HSR) += hsr.o
66

77
hsr-y := hsr_main.o hsr_framereg.o hsr_device.o \
88
hsr_netlink.o hsr_slave.o hsr_forward.o
9-
hsr-$(CONFIG_DEBUG_FS) += hsr_prp_debugfs.o
9+
hsr-$(CONFIG_DEBUG_FS) += hsr_debugfs.o

net/hsr/hsr_prp_debugfs.c renamed to net/hsr/hsr_debugfs.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* hsr_prp_debugfs code
2+
* hsr_debugfs code
33
* Copyright (C) 2017 Texas Instruments Incorporated
44
*
55
* Author(s):
@@ -26,9 +26,9 @@ static void print_mac_address(struct seq_file *sfp, unsigned char *mac)
2626
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
2727
}
2828

29-
/* hsr_prp_node_table_show - Formats and prints node_table entries */
29+
/* hsr_node_table_show - Formats and prints node_table entries */
3030
static int
31-
hsr_prp_node_table_show(struct seq_file *sfp, void *data)
31+
hsr_node_table_show(struct seq_file *sfp, void *data)
3232
{
3333
struct hsr_priv *priv = (struct hsr_priv *)sfp->private;
3434
struct hsr_node *node;
@@ -52,50 +52,50 @@ hsr_prp_node_table_show(struct seq_file *sfp, void *data)
5252
return 0;
5353
}
5454

55-
/* hsr_prp_node_table_open - Open the node_table file
55+
/* hsr_node_table_open - Open the node_table file
5656
*
5757
* Description:
5858
* This routine opens a debugfs file node_table of specific hsr device
5959
*/
6060
static int
61-
hsr_prp_node_table_open(struct inode *inode, struct file *filp)
61+
hsr_node_table_open(struct inode *inode, struct file *filp)
6262
{
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);
6464
}
6565

66-
static const struct file_operations hsr_prp_fops = {
66+
static const struct file_operations hsr_fops = {
6767
.owner = THIS_MODULE,
68-
.open = hsr_prp_node_table_open,
68+
.open = hsr_node_table_open,
6969
.read = seq_read,
7070
.llseek = seq_lseek,
7171
.release = single_release,
7272
};
7373

74-
/* hsr_prp_debugfs_init - create hsr-prp node_table file for dumping
74+
/* hsr_debugfs_init - create hsr node_table file for dumping
7575
* the node table
7676
*
7777
* Description:
7878
* 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
8080
*/
81-
int hsr_prp_debugfs_init(struct hsr_priv *priv)
81+
int hsr_debugfs_init(struct hsr_priv *priv)
8282
{
8383
int rc = -1;
8484
struct dentry *de = NULL;
8585

8686
de = debugfs_create_dir("hsr", NULL);
8787
if (!de) {
88-
pr_err("Cannot create hsr-prp debugfs root\n");
88+
pr_err("Cannot create hsr debugfs root\n");
8989
return rc;
9090
}
9191

9292
priv->node_tbl_root = de;
9393

9494
de = debugfs_create_file("node_table", S_IFREG | 0444,
9595
priv->node_tbl_root, priv,
96-
&hsr_prp_fops);
96+
&hsr_fops);
9797
if (!de) {
98-
pr_err("Cannot create hsr-prp node_table directory\n");
98+
pr_err("Cannot create hsr node_table directory\n");
9999
return rc;
100100
}
101101
priv->node_tbl_file = de;
@@ -104,14 +104,14 @@ int hsr_prp_debugfs_init(struct hsr_priv *priv)
104104
return rc;
105105
}
106106

107-
/* hsr_prp_debugfs_term - Tear down debugfs intrastructure
107+
/* hsr_debugfs_term - Tear down debugfs intrastructure
108108
*
109109
* Description:
110110
* 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
112112
*/
113113
void
114-
hsr_prp_debugfs_term(struct hsr_priv *priv)
114+
hsr_debugfs_term(struct hsr_priv *priv)
115115
{
116116
debugfs_remove(priv->node_tbl_file);
117117
priv->node_tbl_file = NULL;

net/hsr/hsr_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void hsr_dev_destroy(struct net_device *hsr_dev)
354354

355355
hsr = netdev_priv(hsr_dev);
356356

357-
hsr_prp_debugfs_term(hsr);
357+
hsr_debugfs_term(hsr);
358358

359359
rtnl_lock();
360360
hsr_for_each_port(hsr, port)
@@ -485,7 +485,7 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
485485
goto fail;
486486

487487
mod_timer(&hsr->prune_timer, jiffies + msecs_to_jiffies(PRUNE_PERIOD));
488-
res = hsr_prp_debugfs_init(hsr);
488+
res = hsr_debugfs_init(hsr);
489489
if (res)
490490
goto fail;
491491

net/hsr/hsr_main.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
184184
}
185185

186186
#if IS_ENABLED(CONFIG_DEBUG_FS)
187-
int hsr_prp_debugfs_init(struct hsr_priv *priv);
188-
void hsr_prp_debugfs_term(struct hsr_priv *priv);
187+
int hsr_debugfs_init(struct hsr_priv *priv);
188+
void hsr_debugfs_term(struct hsr_priv *priv);
189189
#else
190-
static inline int hsr_prp_debugfs_init(struct hsr_priv *priv)
190+
static inline int hsr_debugfs_init(struct hsr_priv *priv)
191191
{
192192
return 0;
193193
}
194194

195-
static inline void hsr_prp_debugfs_term(struct hsr_priv *priv)
195+
static inline void hsr_debugfs_term(struct hsr_priv *priv)
196196
{}
197197
#endif
198198

0 commit comments

Comments
 (0)