From: kernel test robot <lkp@intel.com>
To: "Ching-Te Ku" <ku920601@realtek.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
0day robot <lkp@intel.com>, "Ping-Ke Shih" <pkshih@realtek.com>
Subject: drivers/net/wireless/realtek/rtw89/coex.c:7957:51: warning: overlapping comparisons always evaluate to true
Date: Fri, 03 Jul 2026 22:00:39 +0200 [thread overview]
Message-ID: <202607032153.rVIyuBbI-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Ping-Ke-Shih/wifi-rtw89-coex-Add-Init-info-version-10/20260703-195949
head: 3838fb6a6e17533236a69064edbe55af1024858b
commit: 868edae4d5e556502d903a8c6bea0b9d3f5558a9 wifi: rtw89: coex: Add WiFi/Bluetooth adapter binding info
date: 8 hours ago
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260703/202607032153.rVIyuBbI-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260703/202607032153.rVIyuBbI-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607032153.rVIyuBbI-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/realtek/rtw89/coex.c:7957:51: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
7957 | if (wl->role_info.link_mode != BTC_WLINK_2G_MCC ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
7958 | wl->role_info.link_mode != BTC_WLINK_25G_MCC ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +7957 drivers/net/wireless/realtek/rtw89/coex.c
7909
7910 #define _bind_is_btonly 0x7
7911 static void _set_coex_binding(struct rtw89_btc *btc)
7912 {
7913 struct rtw89_btc_cx *cx = &btc->cx;
7914 struct rtw89_btc_extsoc_info *bt2 = &cx->bt_ext;
7915 struct rtw89_btc_bt_info *bt0 = &cx->bt0;
7916 struct rtw89_btc_bt_info *bt1 = &cx->bt1;
7917 struct rtw89_btc_wl_info *wl = &cx->wl;
7918 struct rtw89_btc_dm *dm = &btc->dm;
7919 u8 path_hwb[BTC_RF_NUM] = {RTW89_PHY_0, RTW89_PHY_1};
7920 u8 wl_rf_band[RTW89_BAND_NUM] = {};
7921 u8 i, j, val = 0;
7922
7923 /*
7924 * sit_xmap(Space-Interaction) = ant_xmap | xtk_xmap
7925 * 1: WL-BT space-interference, always 1 if BTG/BTA/SPDT = 1
7926 * if dedicated-ant, it may be 1 if BT-Tx is bigger than WL-Rx(xtk_xmap)
7927 *
7928 * ant_xmap(ANT-Division-Multiplexing)
7929 * ==> dedicated-ant->0, BTG/BTA/SPDT->1
7930 *
7931 * xtk_xmap(Cross-talk map)-> calculate WL/BT interference by SIR
7932 * ==> 1: interference, 0: no-interference
7933 *
7934 * fdm_map(Frequency-Division-Multiplexing): WL/BT RF_Band overlap-map
7935 * 2bit-map: bit[1]:5GHz/6GHz, bit[0]:2.4GHz
7936 */
7937 for (i = 0; i < RTW89_PHY_NUM; i++) {
7938 if (wl->rf_band_map[i] & BIT(RTW89_BAND_2G))
7939 wl_rf_band[i] |= BIT(RTW89_BAND_2G);
7940
7941 if (wl->rf_band_map[i] & (BIT(RTW89_BAND_5G) | BIT(RTW89_BAND_6G)))
7942 wl_rf_band[i] |= BIT(RTW89_BAND_5G);
7943
7944 dm->fit_xmap[i][BTC_BT_1ST] = wl_rf_band[i] & bt0->rf_band_map;
7945 dm->fit_xmap[i][BTC_BT_2ND] = wl_rf_band[i] & bt1->rf_band_map;
7946 dm->fit_xmap[i][BTC_BT_EXT] = wl_rf_band[i] & bt2->rf_band_map;
7947 }
7948
7949 /*
7950 * if MR_WTYPE_MLD2L1R_NONMLD, FW will change 2+0/0+2/1+1
7951 * Therefore, BTC_MLO_RF_xxx is not real-time state.
7952 * if link mode change by _ntfy_generic(BTC_GNTFY_MRCX_INFO)
7953 * the HW-BAND is decided by wl->mlo_info.mrcx_act_hwb_map
7954 * In this case, BTC_RF_S0->HWB0, BTC_RF_S1->HWB1
7955 */
7956 if (wl->mlo_info.wtype == RTW89_MR_WTYPE_MLD2L1R_NONMLD) {
> 7957 if (wl->role_info.link_mode != BTC_WLINK_2G_MCC ||
7958 wl->role_info.link_mode != BTC_WLINK_25G_MCC ||
7959 wl->role_info.link_mode != BTC_WLINK_25G_DBCC) {/* mode chg */
7960 if (wl->mlo_info.mrcx_act_hwb_map == BIT(RTW89_PHY_1))
7961 path_hwb[BTC_RF_S0] = RTW89_PHY_1;/* S0/1->HWB1 */
7962 else
7963 path_hwb[BTC_RF_S1] = RTW89_PHY_0;/* S0/1->HWB0 */
7964 }
7965 } else {
7966 if (wl->mlo_info.rf_combination == BTC_MLO_RF_2_PLUS_0)
7967 path_hwb[BTC_RF_S1] = RTW89_PHY_0; /* 2+0 RF-S0/1->HWB0 */
7968 else if (wl->mlo_info.rf_combination == BTC_MLO_RF_0_PLUS_2)
7969 path_hwb[BTC_RF_S0] = RTW89_PHY_1; /* 2+0 RF-S0/1->HWB1 */
7970 }
7971
7972 /*
7973 * tdd_map = sit_xmap * fdm_map, 1: WL-RF-Sx vs. BTx take TDD-Action
7974 * fdd_map =(!sit_xmap) * fdm_map, 1: WL-RF-Sx vs.BTx take FDD-Action
7975 * co-rx map = ant_xmap * fdm_map 1:WL/BT co-rx (for halbb-btg-ctrl)
7976 * sit_xmap,ant_xmap = 0 or 1, so tdd/fdd use multiplication (*)
7977 */
7978
7979 for (i = 0; i < BTC_RF_NUM; i++)
7980 for (j = 0; j < BTC_ALL_BT_EZL; j++) {
7981 dm->tdd_map[i][j] = dm->sit_xmap[i][j] *
7982 dm->fit_xmap[path_hwb[i]][j];
7983 dm->fdd_map[i][j] = !dm->sit_xmap[i][j] *
7984 dm->fit_xmap[path_hwb[i]][j];
7985 dm->corx_map[i][j] = dm->ant_xmap[i][j] *
7986 dm->fit_xmap[path_hwb[i]][j];
7987 }
7988
7989 /* TDD-Binding */
7990 _set_bind_info(btc, BTC_MECH_TDD);
7991
7992 /* FDD-Binding */
7993 _set_bind_info(btc, BTC_MECH_FDD);
7994
7995 dm->out_of_band = !dm->tdd_bind.rf_band && !dm->fdd_bind.rf_band;
7996 dm->fdd_en = !!dm->fdd_bind.rf_band;
7997 dm->tdd_en = !!dm->tdd_bind.rf_band;
7998
7999 /* set BT on/off state for GNT_WL Combined-MUX control */
8000 if (bt0->enable.now)
8001 val |= BIT(0);
8002
8003 if (bt1->enable.now)
8004 val |= BIT(1);
8005
8006 if (bt2->func_type)
8007 val |= BIT(2);
8008
8009 dm->ost_info.bt_enable_state = dm->bt_only ? _bind_is_btonly : val;
8010 }
8011
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-07-03 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 20:00 kernel test robot [this message]
2026-07-06 3:18 ` drivers/net/wireless/realtek/rtw89/coex.c:7957:51: warning: overlapping comparisons always evaluate to true Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202607032153.rVIyuBbI-lkp@intel.com \
--to=lkp@intel.com \
--cc=ku920601@realtek.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox