]> git.baikalelectronics.ru Git - kernel.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)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2019 15:51:18 +0000 (16:51 +0100)
commiteca809e57afa48919688634ae34bdd8db6f07d84
tree346e6b05bc94025dfad7c2ba4ad8c1023a5035f8
parent3ad52d8f55117db4433dbe88b0cffe409a955b48
cfg80211: Use const more consistently in for_each_element macros

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>
include/linux/ieee80211.h
net/wireless/nl80211.c