mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
binder: remove BINDER_DEBUG_ENTRY()
We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define such a macro,so remove BINDER_DEBUG_ENTRY. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Todd Kjos <tkjos@android.com> Reviewed-by: Joey Pabalinas <joeypabalinas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f8a70d8b88
commit
c13e0a5288
1 changed files with 17 additions and 31 deletions
|
@ -94,22 +94,8 @@ static struct dentry *binder_debugfs_dir_entry_root;
|
||||||
static struct dentry *binder_debugfs_dir_entry_proc;
|
static struct dentry *binder_debugfs_dir_entry_proc;
|
||||||
static atomic_t binder_last_id;
|
static atomic_t binder_last_id;
|
||||||
|
|
||||||
#define BINDER_DEBUG_ENTRY(name) \
|
static int proc_show(struct seq_file *m, void *unused);
|
||||||
static int binder_##name##_open(struct inode *inode, struct file *file) \
|
DEFINE_SHOW_ATTRIBUTE(proc);
|
||||||
{ \
|
|
||||||
return single_open(file, binder_##name##_show, inode->i_private); \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
static const struct file_operations binder_##name##_fops = { \
|
|
||||||
.owner = THIS_MODULE, \
|
|
||||||
.open = binder_##name##_open, \
|
|
||||||
.read = seq_read, \
|
|
||||||
.llseek = seq_lseek, \
|
|
||||||
.release = single_release, \
|
|
||||||
}
|
|
||||||
|
|
||||||
static int binder_proc_show(struct seq_file *m, void *unused);
|
|
||||||
BINDER_DEBUG_ENTRY(proc);
|
|
||||||
|
|
||||||
/* This is only defined in include/asm-arm/sizes.h */
|
/* This is only defined in include/asm-arm/sizes.h */
|
||||||
#ifndef SZ_1K
|
#ifndef SZ_1K
|
||||||
|
@ -5008,7 +4994,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
|
||||||
proc->debugfs_entry = debugfs_create_file(strbuf, 0444,
|
proc->debugfs_entry = debugfs_create_file(strbuf, 0444,
|
||||||
binder_debugfs_dir_entry_proc,
|
binder_debugfs_dir_entry_proc,
|
||||||
(void *)(unsigned long)proc->pid,
|
(void *)(unsigned long)proc->pid,
|
||||||
&binder_proc_fops);
|
&proc_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5636,7 +5622,7 @@ static void print_binder_proc_stats(struct seq_file *m,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int binder_state_show(struct seq_file *m, void *unused)
|
static int state_show(struct seq_file *m, void *unused)
|
||||||
{
|
{
|
||||||
struct binder_proc *proc;
|
struct binder_proc *proc;
|
||||||
struct binder_node *node;
|
struct binder_node *node;
|
||||||
|
@ -5675,7 +5661,7 @@ static int binder_state_show(struct seq_file *m, void *unused)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int binder_stats_show(struct seq_file *m, void *unused)
|
static int stats_show(struct seq_file *m, void *unused)
|
||||||
{
|
{
|
||||||
struct binder_proc *proc;
|
struct binder_proc *proc;
|
||||||
|
|
||||||
|
@ -5691,7 +5677,7 @@ static int binder_stats_show(struct seq_file *m, void *unused)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int binder_transactions_show(struct seq_file *m, void *unused)
|
static int transactions_show(struct seq_file *m, void *unused)
|
||||||
{
|
{
|
||||||
struct binder_proc *proc;
|
struct binder_proc *proc;
|
||||||
|
|
||||||
|
@ -5704,7 +5690,7 @@ static int binder_transactions_show(struct seq_file *m, void *unused)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int binder_proc_show(struct seq_file *m, void *unused)
|
static int proc_show(struct seq_file *m, void *unused)
|
||||||
{
|
{
|
||||||
struct binder_proc *itr;
|
struct binder_proc *itr;
|
||||||
int pid = (unsigned long)m->private;
|
int pid = (unsigned long)m->private;
|
||||||
|
@ -5747,7 +5733,7 @@ static void print_binder_transaction_log_entry(struct seq_file *m,
|
||||||
"\n" : " (incomplete)\n");
|
"\n" : " (incomplete)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int binder_transaction_log_show(struct seq_file *m, void *unused)
|
static int transaction_log_show(struct seq_file *m, void *unused)
|
||||||
{
|
{
|
||||||
struct binder_transaction_log *log = m->private;
|
struct binder_transaction_log *log = m->private;
|
||||||
unsigned int log_cur = atomic_read(&log->cur);
|
unsigned int log_cur = atomic_read(&log->cur);
|
||||||
|
@ -5779,10 +5765,10 @@ static const struct file_operations binder_fops = {
|
||||||
.release = binder_release,
|
.release = binder_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
BINDER_DEBUG_ENTRY(state);
|
DEFINE_SHOW_ATTRIBUTE(state);
|
||||||
BINDER_DEBUG_ENTRY(stats);
|
DEFINE_SHOW_ATTRIBUTE(stats);
|
||||||
BINDER_DEBUG_ENTRY(transactions);
|
DEFINE_SHOW_ATTRIBUTE(transactions);
|
||||||
BINDER_DEBUG_ENTRY(transaction_log);
|
DEFINE_SHOW_ATTRIBUTE(transaction_log);
|
||||||
|
|
||||||
static int __init init_binder_device(const char *name)
|
static int __init init_binder_device(const char *name)
|
||||||
{
|
{
|
||||||
|
@ -5836,27 +5822,27 @@ static int __init binder_init(void)
|
||||||
0444,
|
0444,
|
||||||
binder_debugfs_dir_entry_root,
|
binder_debugfs_dir_entry_root,
|
||||||
NULL,
|
NULL,
|
||||||
&binder_state_fops);
|
&state_fops);
|
||||||
debugfs_create_file("stats",
|
debugfs_create_file("stats",
|
||||||
0444,
|
0444,
|
||||||
binder_debugfs_dir_entry_root,
|
binder_debugfs_dir_entry_root,
|
||||||
NULL,
|
NULL,
|
||||||
&binder_stats_fops);
|
&stats_fops);
|
||||||
debugfs_create_file("transactions",
|
debugfs_create_file("transactions",
|
||||||
0444,
|
0444,
|
||||||
binder_debugfs_dir_entry_root,
|
binder_debugfs_dir_entry_root,
|
||||||
NULL,
|
NULL,
|
||||||
&binder_transactions_fops);
|
&transactions_fops);
|
||||||
debugfs_create_file("transaction_log",
|
debugfs_create_file("transaction_log",
|
||||||
0444,
|
0444,
|
||||||
binder_debugfs_dir_entry_root,
|
binder_debugfs_dir_entry_root,
|
||||||
&binder_transaction_log,
|
&binder_transaction_log,
|
||||||
&binder_transaction_log_fops);
|
&transaction_log_fops);
|
||||||
debugfs_create_file("failed_transaction_log",
|
debugfs_create_file("failed_transaction_log",
|
||||||
0444,
|
0444,
|
||||||
binder_debugfs_dir_entry_root,
|
binder_debugfs_dir_entry_root,
|
||||||
&binder_transaction_log_failed,
|
&binder_transaction_log_failed,
|
||||||
&binder_transaction_log_fops);
|
&transaction_log_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue