mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: fix mxm5x17391 release build error and warnings
Rename README_MLAN to README in Makefile, otherwise it will build break becasue cannot find README_MLAN any more. Also, fix the following build warnings on ARM32 and ARM64 platforms. In file included from ./include/linux/kernel.h:29, from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:37, from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.h:26, from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c:23: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c: In function ‘woal_cfg80211_subcmd_rtt_range_request’: ./include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ./include/linux/printk.h:429:25: note: in definition of macro ‘printk_index_wrap’ 429 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3167:25: note: in expansion of macro ‘printk’ 3167 | printk(KERN_ERR msg); \ | ^~~~~~ ./include/linux/kern_levels.h:11:25: note: in expansion of macro ‘KERN_SOH’ 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3167:32: note: in expansion of macro ‘KERN_ERR’ 3167 | printk(KERN_ERR msg); \ | ^~~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3186:31: note: in expansion of macro ‘PRINTM_MERROR’ 3186 | #define PRINTM(level, msg...) PRINTM_##level(level, msg) | ^~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c:4351:17: note: in expansion of macro ‘PRINTM’ 4351 | PRINTM(MERROR, "%s: invalid %d(total) != %d(num) * %lu(each)\n", | ^~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_init.c: In function ‘parse_line_read_card_info’: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_init.c:556:37: warning: the comparison will always evaluate as ‘true’ for the pointer operand in ‘p + 1’ must not be NULL [-Waddress] 556 | if ((p != NULL) && ((p + 1) != NULL)) { | ^~ Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
6bc61f660b
commit
a206d37a93
3 changed files with 7 additions and 7 deletions
|
@ -659,7 +659,7 @@ appsbuild:
|
||||||
mkdir $(BINDIR); \
|
mkdir $(BINDIR); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -f README_MLAN $(BINDIR)
|
cp -f README $(BINDIR)
|
||||||
|
|
||||||
ifneq ($(APPDIR),)
|
ifneq ($(APPDIR),)
|
||||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||||
|
@ -678,7 +678,7 @@ build: echo default
|
||||||
cp -rpf script/load $(BINDIR)/
|
cp -rpf script/load $(BINDIR)/
|
||||||
cp -rpf script/unload $(BINDIR)/
|
cp -rpf script/unload $(BINDIR)/
|
||||||
|
|
||||||
cp -f README_MLAN $(BINDIR)
|
cp -f README $(BINDIR)
|
||||||
|
|
||||||
ifneq ($(APPDIR),)
|
ifneq ($(APPDIR),)
|
||||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||||
|
|
|
@ -4348,9 +4348,9 @@ static int woal_cfg80211_subcmd_rtt_range_request(struct wiphy *wiphy,
|
||||||
}
|
}
|
||||||
if (nla_len(tb[ATTR_RTT_TARGET_CONFIG]) !=
|
if (nla_len(tb[ATTR_RTT_TARGET_CONFIG]) !=
|
||||||
sizeof(rtt_params.rtt_config[0]) * rtt_config_num) {
|
sizeof(rtt_params.rtt_config[0]) * rtt_config_num) {
|
||||||
PRINTM(MERROR, "%s: invalid %d(total) != %d(num) * %lu(each)\n",
|
PRINTM(MERROR, "%s: invalid %d(total) != %d(num) * %u(each)\n",
|
||||||
__func__, nla_len(tb[ATTR_RTT_TARGET_CONFIG]),
|
__func__, nla_len(tb[ATTR_RTT_TARGET_CONFIG]),
|
||||||
rtt_config_num, sizeof(rtt_params.rtt_config[0]));
|
rtt_config_num, (t_u32)sizeof(rtt_params.rtt_config[0]));
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -4463,9 +4463,9 @@ static int woal_cfg80211_subcmd_rtt_range_cancel(struct wiphy *wiphy,
|
||||||
if ((target_num <= 0 || target_num > MAX_RTT_CONFIG_NUM) ||
|
if ((target_num <= 0 || target_num > MAX_RTT_CONFIG_NUM) ||
|
||||||
(nla_len(tb[ATTR_RTT_TARGET_ADDR]) !=
|
(nla_len(tb[ATTR_RTT_TARGET_ADDR]) !=
|
||||||
sizeof(t_u8) * MLAN_MAC_ADDR_LENGTH * target_num)) {
|
sizeof(t_u8) * MLAN_MAC_ADDR_LENGTH * target_num)) {
|
||||||
PRINTM(MERROR, "%s: Check if %din[1-%d] or %d*%lu=%d\n",
|
PRINTM(MERROR, "%s: Check if %din[1-%d] or %d*%u=%d\n",
|
||||||
__func__, target_num, MAX_RTT_CONFIG_NUM, target_num,
|
__func__, target_num, MAX_RTT_CONFIG_NUM, target_num,
|
||||||
sizeof(t_u8) * MLAN_MAC_ADDR_LENGTH,
|
(t_u32)(sizeof(t_u8) * MLAN_MAC_ADDR_LENGTH),
|
||||||
nla_len(tb[ATTR_RTT_TARGET_ADDR]));
|
nla_len(tb[ATTR_RTT_TARGET_ADDR]));
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -553,7 +553,7 @@ static mlan_status parse_line_read_card_info(t_u8 *line, char **type,
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
p = strstr(line, "_");
|
p = strstr(line, "_");
|
||||||
if ((p != NULL) && ((p + 1) != NULL)) {
|
if (p != NULL) {
|
||||||
*p++ = '\0';
|
*p++ = '\0';
|
||||||
*if_id = p;
|
*if_id = p;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue