Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: use ARRAY_SIZE
@ 2007-03-27 15:59 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2007-03-27 15:59 UTC (permalink / raw)
  To: Jiri Benc; +Cc: linux-wireless

This patch converts all applicable instances of
sizeof(array)/sizeof(member) that I found to ARRAY_SIZE.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/mac80211/ieee80211_ioctl.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c	2007-03-27 16:33:30.893155480 +0200
+++ wireless-dev/net/mac80211/ieee80211_ioctl.c	2007-03-27 16:33:44.363155480 +0200
@@ -3273,11 +3273,9 @@ static const iw_handler ieee80211_privat
 
 const struct iw_handler_def ieee80211_iw_handler_def =
 {
-	.num_standard	= sizeof(ieee80211_handler) / sizeof(iw_handler),
-	.num_private	= sizeof(ieee80211_private_handler) /
-			  sizeof(iw_handler),
-	.num_private_args = sizeof(ieee80211_ioctl_priv) /
-			    sizeof(struct iw_priv_args),
+	.num_standard	= ARRAY_SIZE(ieee80211_handler),
+	.num_private	= ARRAY_SIZE(ieee80211_private_handler),
+	.num_private_args = ARRAY_SIZE(ieee80211_ioctl_priv),
 	.standard	= (iw_handler *) ieee80211_handler,
 	.private	= (iw_handler *) ieee80211_private_handler,
 	.private_args	= (struct iw_priv_args *) ieee80211_ioctl_priv,



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-28  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 15:59 [PATCH] mac80211: use ARRAY_SIZE Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox