staging: wilc1000: Modification in code to use ARRAY_SIZE macro

Author: Chaitanya Dhere <cvijaydh@visteon.com>

In this patch, ARRAY_SIZE() macro is used to determine the
size. This change was detected with the help of coccinelle
tool.

Signed-off-by: Chaitanya Dhere 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index b033eb8..592b8ae 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1737,7 +1737,7 @@ static int linux_wlan_read_mac_addr(void *vp)
 	mm_segment_t old_fs;
 	loff_t pos = 0;
 	int index;
-	int array_size = sizeof(path_string) / sizeof(path_string[0]);
+	int array_size = ARRAY_SIZE(path_string);
 
 	/* change to KERNEL_DS address limit */
 	old_fs = get_fs();
BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.