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:
Dustin Brown
2017-09-25 10:34:21 -07:00
کامیت شده توسط snandini
والد 25607a7bb8
کامیت 54771c7c6d

مشاهده پرونده

@@ -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