mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00:00
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>
This commit is contained in:
parent
9a07bf507d
commit
aee6499c8c
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ static inline u32 u32_field_get(const u8 *preq_elem, int offset, bool ae)
|
||||||
return get_unaligned_le32(preq_elem + offset);
|
return get_unaligned_le32(preq_elem + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u32 u16_field_get(const u8 *preq_elem, int offset, bool ae)
|
static inline u16 u16_field_get(const u8 *preq_elem, int offset, bool ae)
|
||||||
{
|
{
|
||||||
if (ae)
|
if (ae)
|
||||||
offset += 6;
|
offset += 6;
|
||||||
|
|
Loading…
Reference in a new issue