cfg80211: Use const more consistently in for_each_element macros
authorJouni Malinen <j@w1.fi>
Mon, 11 Feb 2019 14:29:04 +0000 (16:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:21:43 +0000 (18:21 +0200)
commit527ba5d7634b230448c133b6eea304146ec0aa5e
tree04f90884623c8e563ba246acd093233b7dcad0c1
parentad180cace853e60532d118cce17565e4138eb596
cfg80211: Use const more consistently in for_each_element macros

commit 7388afe09143210f555bdd6c75035e9acc1fab96 upstream.

Enforce the first argument to be a correct type of a pointer to struct
element and avoid unnecessary typecasts from const to non-const pointers
(the change in validate_ie_attr() is needed to make this part work). In
addition, avoid signed/unsigned comparison within for_each_element() and
mark struct element packed just in case.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ieee80211.h