All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/wireless: fix sparse warnings
@ 2007-02-26 22:46 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2007-02-26 22:46 UTC (permalink / raw)
  To: linux-wireless

This fixes a few things sparse pointed out when I finally got it
working.

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

---
 net/wireless/sysfs.c       |    1 +
 net/wireless/wext-common.c |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

--- wireless-dev.orig/net/wireless/sysfs.c	2007-02-26 23:42:38.124692803 +0100
+++ wireless-dev/net/wireless/sysfs.c	2007-02-26 23:42:43.314692803 +0100
@@ -13,6 +13,7 @@
 #include <linux/netdevice.h>
 #include <linux/nl80211.h>
 #include <net/cfg80211.h>
+#include "sysfs.h"
 #include "core.h"
 
 static inline struct cfg80211_registered_device *dev_to_rdev(
--- wireless-dev.orig/net/wireless/wext-common.c	2007-02-26 23:43:08.314692803 +0100
+++ wireless-dev/net/wireless/wext-common.c	2007-02-26 23:44:55.654692803 +0100
@@ -13,10 +13,11 @@
 #include <linux/module.h>
 #include <linux/wireless.h>
 #include <linux/types.h>
-#include <net/iw_handler.h>
 #include <linux/seq_file.h>
-#include <net/netlink.h>
 #include <linux/rtnetlink.h>
+#include <net/iw_handler.h>
+#include <net/netlink.h>
+#include <net/wireless.h>
 #include "wext.h"
 
 /* common data */
@@ -301,8 +302,7 @@ const struct iw_ioctl_description standa
 		.max_tokens	= sizeof(struct iw_pmkid_cand),
 	},
 };
-unsigned standard_event_num = (sizeof(standard_event) /
-					sizeof(struct iw_ioctl_description));
+static unsigned standard_event_num = ARRAY_SIZE(standard_event);
 
 /* Size (in bytes) of various events */
 const int event_type_size[] = {



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

only message in thread, other threads:[~2007-02-26 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 22:46 [PATCH] net/wireless: fix sparse warnings Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.