mac80211: make ieee80211_new_mesh_header return unsigned
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 25 Sep 2015 06:42:00 +0000 (08:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 5 Oct 2015 15:54:16 +0000 (17:54 +0200)
The function returns always non-negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh.c
net/mac80211/mesh.h

index 62b3e29e50f47ecbfc5698acbbf326f493e39f80..626e8de7084266767ab2c7d2fdfb4df112bc6f22 100644 (file)
@@ -606,9 +606,9 @@ int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
  *
  * Return the header length.
  */
-int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata,
-                             struct ieee80211s_hdr *meshhdr,
-                             const char *addr4or5, const char *addr6)
+unsigned int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata,
+                                      struct ieee80211s_hdr *meshhdr,
+                                      const char *addr4or5, const char *addr6)
 {
        if (WARN_ON(!addr4or5 && addr6))
                return 0;
index c60be85d7965b70d22bb9b4bbf9939e85766a4ce..a1596344c3ba1c5fe590767f3c0483310d63121a 100644 (file)
@@ -207,9 +207,9 @@ struct mesh_rmc {
 /* Various */
 int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
                                  const u8 *da, const u8 *sa);
-int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata,
-                             struct ieee80211s_hdr *meshhdr,
-                             const char *addr4or5, const char *addr6);
+unsigned int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata,
+                                      struct ieee80211s_hdr *meshhdr,
+                                      const char *addr4or5, const char *addr6);
 int mesh_rmc_check(struct ieee80211_sub_if_data *sdata,
                   const u8 *addr, struct ieee80211s_hdr *mesh_hdr);
 bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,