Search Linux Wireless

[PATCH] net/wireless: fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

---
 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[] = {


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux