Skip to content

Commit 848ba9f

Browse files
Caesar-githubrkhuangtao
authored andcommitted
net: wireless: rockchip_wlan: fixes the warning with gcc-7.2 build
when used the arm-linux-gnueabihf-gcc-7.2.1, had the below warning information: 1) drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.c:607:14: warning: self-comparison always evaluates to false [-Wtautological-compare] 2) drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c:3583:16: warning: comparison between pointer and zero character constant [-Wpointer-compare] error, forbidden warning: dhd_common.c:3583 Change-Id: Ida287252b7f20b17b68365b965edbff63ae7cbf9 Signed-off-by: Caesar Wang <wxt@rock-chips.com>
1 parent bdf6d5f commit 848ba9f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3580,7 +3580,7 @@ dhd_pktfilter_offload_set(dhd_pub_t * dhd, char *arg)
35803580
htod16(WL_PKT_FILTER_MFLAG_NEG);
35813581
(argv[i])++;
35823582
}
3583-
if (argv[i] == '\0') {
3583+
if (strlen(argv[i]) == 0) {
35843584
printf("Pattern not provided\n");
35853585
goto fail;
35863586
}

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,14 @@ si_doattach(si_info_t *sii, uint devid, osl_t *osh, volatile void *regs,
604604
}
605605

606606
sih->bustype = bustype;
607+
608+
#ifdef BCMBUSTYPE
607609
if (bustype != BUSTYPE(bustype)) {
608610
SI_ERROR(("si_doattach: bus type %d does not match configured bus type %d\n",
609611
bustype, BUSTYPE(bustype)));
610612
return NULL;
611613
}
614+
#endif
612615

613616
/* bus/core/clk setup for register access */
614617
if (!si_buscore_prep(sii, bustype, devid, sdh)) {

0 commit comments

Comments
 (0)