* [PATCH] staging: wilc1000: Modification in code to use ARRAY_SIZE macro
@ 2015-06-02 9:58 Dhere, Chaitanya (C.)
0 siblings, 0 replies; only message in thread
From: Dhere, Chaitanya (C.) @ 2015-06-02 9:58 UTC (permalink / raw)
To: Johnny Kim, Rachel Kim, Dean Lee, Chris Park, Greg Kroah-Hartman
Cc: linux-wireless, devel, linux-kernel
From: 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 <cvijaydh@visteon.com>
---
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();
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-02 9:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 9:58 [PATCH] staging: wilc1000: Modification in code to use ARRAY_SIZE macro Dhere, Chaitanya (C.)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).