diff options
author | Gargi Sharma <gs051095@gmail.com> | 2017-03-08 22:36:22 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-09 19:07:57 +0100 |
commit | d493859392000828804c0f1bfe500e3ce17d533f (patch) | |
tree | 31d709a5db49c0048ac86e931a625a20adda3464 /drivers/staging/vc04_services | |
parent | ecf2d4aa7abe3128bf3f49d7b21f269c8a937cf2 (diff) |
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.cocci
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-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 3a3c0a1bf24d..9367a9a5aa3c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -81,9 +81,7 @@ static struct vchiq_debugfs_log_entry vchiq_debugfs_log_entries[] = { { "susp", &vchiq_susp_log_level }, { "arm", &vchiq_arm_log_level }, }; -static int n_log_entries = - sizeof(vchiq_debugfs_log_entries)/sizeof(vchiq_debugfs_log_entries[0]); - +static int n_log_entries = ARRAY_SIZE(vchiq_debugfs_log_entries); static struct dentry *vchiq_clients_top(void); static struct dentry *vchiq_debugfs_top(void); |