Commit d4938593 authored by Gargi Sharma's avatar Gargi Sharma Committed by Greg Kroah-Hartman

staging: vc04_services: Use ARRAY_SIZE macro

Use ARRAY_SIZE to calculate the size of an array.
The semantic patch used can be found here:
https://github.com/coccinelle/coccinellery/blob/master/arraysize/array.cocciSigned-off-by: default avatarGargi Sharma <gs051095@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ecf2d4aa
...@@ -81,9 +81,7 @@ static struct vchiq_debugfs_log_entry vchiq_debugfs_log_entries[] = { ...@@ -81,9 +81,7 @@ static struct vchiq_debugfs_log_entry vchiq_debugfs_log_entries[] = {
{ "susp", &vchiq_susp_log_level }, { "susp", &vchiq_susp_log_level },
{ "arm", &vchiq_arm_log_level }, { "arm", &vchiq_arm_log_level },
}; };
static int n_log_entries = static int n_log_entries = ARRAY_SIZE(vchiq_debugfs_log_entries);
sizeof(vchiq_debugfs_log_entries)/sizeof(vchiq_debugfs_log_entries[0]);
static struct dentry *vchiq_clients_top(void); static struct dentry *vchiq_clients_top(void);
static struct dentry *vchiq_debugfs_top(void); static struct dentry *vchiq_debugfs_top(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment