OSDN Git Service

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:40:57 +0000 (13:40 -0700)
commita698649b8e32f80ab1e863f9133ae00f8848544b
tree34282c35bb7c1a3d0173f36cf952a0e244260ea4
parent933f4f10c9286ce577db1454abb6b50c124823f9
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