diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2022-01-23 21:02:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-25 16:30:15 +0100 |
commit | e1a17ce82f1808182338707be5aa5eda6a6144f3 (patch) | |
tree | 0255161fe6b91d762a2915293126dc10987c1b6d | |
parent | staging: vchiq_core: fix indentation in vchiq_log_dump_mem (diff) | |
download | linux-dev-e1a17ce82f1808182338707be5aa5eda6a6144f3.tar.xz linux-dev-e1a17ce82f1808182338707be5aa5eda6a6144f3.zip |
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>
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c index 8f3d9cb2d562..dc667afd1f8c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -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); |