Skip to content

Commit 56303d3

Browse files
ecsvAntonio Quartulli
authored andcommitted
batman-adv: Prefix types structs with batadv_
Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
1 parent 9641269 commit 56303d3

31 files changed

Lines changed: 1029 additions & 938 deletions

‎net/batman-adv/bat_debugfs.c‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static struct dentry *batadv_debugfs;
4040

4141
static int batadv_log_buff_len = BATADV_LOG_BUF_LEN;
4242

43-
static void batadv_emit_log_char(struct debug_log *debug_log, char c)
43+
static void batadv_emit_log_char(struct batadv_debug_log *debug_log, char c)
4444
{
4545
BATADV_LOG_BUFF(debug_log->log_end) = c;
4646
debug_log->log_end++;
@@ -50,7 +50,8 @@ static void batadv_emit_log_char(struct debug_log *debug_log, char c)
5050
}
5151

5252
__printf(2, 3)
53-
static int batadv_fdebug_log(struct debug_log *debug_log, const char *fmt, ...)
53+
static int batadv_fdebug_log(struct batadv_debug_log *debug_log,
54+
const char *fmt, ...)
5455
{
5556
va_list args;
5657
static char debug_log_buf[256];
@@ -74,7 +75,7 @@ static int batadv_fdebug_log(struct debug_log *debug_log, const char *fmt, ...)
7475
return 0;
7576
}
7677

77-
int batadv_debug_log(struct bat_priv *bat_priv, const char *fmt, ...)
78+
int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...)
7879
{
7980
va_list args;
8081
char tmp_log_buf[256];
@@ -105,8 +106,8 @@ static int batadv_log_release(struct inode *inode, struct file *file)
105106
static ssize_t batadv_log_read(struct file *file, char __user *buf,
106107
size_t count, loff_t *ppos)
107108
{
108-
struct bat_priv *bat_priv = file->private_data;
109-
struct debug_log *debug_log = bat_priv->debug_log;
109+
struct batadv_priv *bat_priv = file->private_data;
110+
struct batadv_debug_log *debug_log = bat_priv->debug_log;
110111
int error, i = 0;
111112
char c;
112113

@@ -158,8 +159,8 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf,
158159

159160
static unsigned int batadv_log_poll(struct file *file, poll_table *wait)
160161
{
161-
struct bat_priv *bat_priv = file->private_data;
162-
struct debug_log *debug_log = bat_priv->debug_log;
162+
struct batadv_priv *bat_priv = file->private_data;
163+
struct batadv_debug_log *debug_log = bat_priv->debug_log;
163164

164165
poll_wait(file, &debug_log->queue_wait, wait);
165166

@@ -177,7 +178,7 @@ static const struct file_operations batadv_log_fops = {
177178
.llseek = no_llseek,
178179
};
179180

180-
static int batadv_debug_log_setup(struct bat_priv *bat_priv)
181+
static int batadv_debug_log_setup(struct batadv_priv *bat_priv)
181182
{
182183
struct dentry *d;
183184

@@ -203,19 +204,19 @@ static int batadv_debug_log_setup(struct bat_priv *bat_priv)
203204
return -ENOMEM;
204205
}
205206

206-
static void batadv_debug_log_cleanup(struct bat_priv *bat_priv)
207+
static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)
207208
{
208209
kfree(bat_priv->debug_log);
209210
bat_priv->debug_log = NULL;
210211
}
211212
#else /* CONFIG_BATMAN_ADV_DEBUG */
212-
static int batadv_debug_log_setup(struct bat_priv *bat_priv)
213+
static int batadv_debug_log_setup(struct batadv_priv *bat_priv)
213214
{
214215
bat_priv->debug_log = NULL;
215216
return 0;
216217
}
217218

218-
static void batadv_debug_log_cleanup(struct bat_priv *bat_priv)
219+
static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)
219220
{
220221
return;
221222
}
@@ -339,7 +340,7 @@ void batadv_debugfs_destroy(void)
339340

340341
int batadv_debugfs_add_meshif(struct net_device *dev)
341342
{
342-
struct bat_priv *bat_priv = netdev_priv(dev);
343+
struct batadv_priv *bat_priv = netdev_priv(dev);
343344
struct batadv_debuginfo **bat_debug;
344345
struct dentry *file;
345346

@@ -382,7 +383,7 @@ int batadv_debugfs_add_meshif(struct net_device *dev)
382383

383384
void batadv_debugfs_del_meshif(struct net_device *dev)
384385
{
385-
struct bat_priv *bat_priv = netdev_priv(dev);
386+
struct batadv_priv *bat_priv = netdev_priv(dev);
386387

387388
batadv_debug_log_cleanup(bat_priv);
388389

0 commit comments

Comments
 (0)