mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
qcacmn: Throw error if nla_parse is used directly
In order to support multiple nla_parse function signatures across different kernel versions, a new wlan_cfg80211_nla_parse wrapper was introduced. However, it is easy for propagations or new code to reintroduce nla_parse. Redefine nla_parse to throw an error, to prevent the function from being reintroduced into the code base. Change-Id: I3015d1b3f25a1469632401899555a6260ba2dfc1 CRs-Fixed: 2116051
This commit is contained in:
parent
25607a7bb8
commit
54771c7c6d
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,7 @@
|
|||
.doit = NULL \
|
||||
},
|
||||
|
||||
#undef nla_parse
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
static inline int wlan_cfg80211_nla_parse(struct nlattr **tb,
|
||||
int maxtype,
|
||||
|
|
@ -83,6 +84,7 @@ static inline int wlan_cfg80211_nla_parse(struct nlattr **tb,
|
|||
return nla_parse(tb, maxtype, head, len, policy, NULL);
|
||||
}
|
||||
#endif
|
||||
#define nla_parse(...) (obsolete, use wlan_cfg80211_nla_parse or hdd_nla_parse)
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||
static inline int
|
||||
|
|
|
|||
Loading…
Reference in a new issue