]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Thu, 17 Oct 2019 20:42:22 +0000 (13:42 -0700)
commitfbc012a110068da1f2912835e094308aeaf7af9a
tree6e64bbeef5361fd39b58261983fd4e34f323ffd5
parentc48986ff2476fddad67b47467e308a1d7c17c988
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