diff options
author | Bob Copeland <me@bobcopeland.com> | 2014-04-15 10:43:06 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-22 11:24:49 -0400 |
commit | aee6499c8c6d0d1bc75cbae51f89c4d35a5aaa1f (patch) | |
tree | 59471e267fdfed0618adc81b8749c00c0e19b64f | |
parent | 9a07bf507dfc5402e63d96596341f2a15e4142c7 (diff) |
mac80211: mesh: use u16 return type for u16 getter
u16_field_get() is a simple wrapper around get_unaligned_le16(),
and it is being assigned to a u16, so there's no need to
promote to u32 in the middle.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index f9514685d45a..03ff5ea95559 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -37,7 +37,7 @@ static inline u32 u32_field_get(const u8 *preq_elem, int offset, bool ae) | |||
37 | return get_unaligned_le32(preq_elem + offset); | 37 | return get_unaligned_le32(preq_elem + offset); |
38 | } | 38 | } |
39 | 39 | ||
40 | static inline u32 u16_field_get(const u8 *preq_elem, int offset, bool ae) | 40 | static inline u16 u16_field_get(const u8 *preq_elem, int offset, bool ae) |
41 | { | 41 | { |
42 | if (ae) | 42 | if (ae) |
43 | offset += 6; | 43 | offset += 6; |