mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
staging: vchiq_debugfs: get the rid of n_log_entries
There is no need for this static variable, so use the macro directly. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a1f3974625
commit
e1a17ce82f
1 changed files with 1 additions and 3 deletions
|
@ -36,8 +36,6 @@ static struct vchiq_debugfs_log_entry vchiq_debugfs_log_entries[] = {
|
|||
{ "arm", &vchiq_arm_log_level },
|
||||
};
|
||||
|
||||
static int n_log_entries = ARRAY_SIZE(vchiq_debugfs_log_entries);
|
||||
|
||||
static int debugfs_log_show(struct seq_file *f, void *offset)
|
||||
{
|
||||
int *levp = f->private;
|
||||
|
@ -216,7 +214,7 @@ void vchiq_debugfs_init(void)
|
|||
/* create an entry under <debugfs>/vchiq/log for each log category */
|
||||
dir = debugfs_create_dir("log", vchiq_dbg_dir);
|
||||
|
||||
for (i = 0; i < n_log_entries; i++)
|
||||
for (i = 0; i < ARRAY_SIZE(vchiq_debugfs_log_entries); i++)
|
||||
debugfs_create_file(vchiq_debugfs_log_entries[i].name, 0644,
|
||||
dir, vchiq_debugfs_log_entries[i].plevel,
|
||||
&debugfs_log_fops);
|
||||
|
|
Loading…
Reference in a new issue