[PATCH 4/8] wireless: use ARRAY_SIZE()

2007-03-08 Thread Stephen Hemminger
Use ARRAY_SIZE() macro now.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/core/wireless.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

--- net-2.6.22.orig/net/core/wireless.c 2007-03-07 15:16:15.0 -0800
+++ net-2.6.22/net/core/wireless.c  2007-03-07 15:16:37.0 -0800
@@ -346,8 +346,7 @@
.max_tokens = sizeof(struct iw_pmksa),
},
 };
-static const unsigned standard_ioctl_num = (sizeof(standard_ioctl) /
-   sizeof(struct 
iw_ioctl_description));
+static const unsigned standard_ioctl_num = ARRAY_SIZE(standard_ioctl);
 
 /*
  * Meta-data about all the additional standard Wireless Extension events
@@ -397,8 +396,7 @@
.max_tokens = sizeof(struct iw_pmkid_cand),
},
 };
-static const unsigned standard_event_num = (sizeof(standard_event) /
-   sizeof(struct 
iw_ioctl_description));
+static const unsigned standard_event_num = ARRAY_SIZE(standard_event);
 
 /* Size (in bytes) of the various private data types */
 static const char iw_priv_type_size[] = {

--
Stephen Hemminger [EMAIL PROTECTED]

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/8] wireless: use ARRAY_SIZE()

2007-03-08 Thread David Miller
From: Stephen Hemminger [EMAIL PROTECTED]
Date: Thu, 08 Mar 2007 12:52:18 -0800

 Use ARRAY_SIZE() macro now.
 
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

Applied.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html