Message ID | 20220520194320.2356236-4-kuba@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
Series | Fix/silence GCC 12 warnings in drivers/net/wireless/ | expand |
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: Saturday, May 21, 2022 3:43 AM > To: kvalo@kernel.org; johannes@sipsolutions.net > Cc: netdev@vger.kernel.org; linux-wireless@vger.kernel.org; Jakub Kicinski <kuba@kernel.org>; Pkshih > <pkshih@realtek.com>; keescook@chromium.org; colin.king@intel.com > Subject: [PATCH net-next 3/8] wifi: rtlwifi: remove always-true condition pointed out by GCC 12 > > The .value is a two-dim array, not a pointer. > > struct iqk_matrix_regs { > bool iqk_done; > long value[1][IQK_MATRIX_REG_NUM]; > }; > > Signed-off-by: Jakub Kicinski <kuba@kernel.org> > --- > CC: pkshih@realtek.com > CC: kvalo@kernel.org > CC: keescook@chromium.org > CC: colin.king@intel.com > CC: linux-wireless@vger.kernel.org > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c > b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c > index 51fe51bb0504..15e6a6aded31 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c > @@ -2386,10 +2386,7 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) > rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD, > "Just Read IQK Matrix reg for channel:%d....\n", > channel); > - if ((rtlphy->iqk_matrix[indexforchannel]. > - value[0] != NULL) This is a typo since initial commit. Correct it by - value[0] != NULL) + value[0][0] != 0) So, NACK this patch. -- Ping-Ke
On Mon, 23 May 2022 02:35:32 +0000 Ping-Ke Shih wrote: > This is a typo since initial commit. Correct it by > - value[0] != NULL) > + value[0][0] != 0) > > So, NACK this patch. Too, late, the patches were already applied, sorry. Please post a fixup.
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: Monday, May 23, 2022 11:57 PM > To: Ping-Ke Shih <pkshih@realtek.com> > Cc: kvalo@kernel.org; johannes@sipsolutions.net; netdev@vger.kernel.org; linux-wireless@vger.kernel.org; > keescook@chromium.org; colin.king@intel.com > Subject: Re: [PATCH net-next 3/8] wifi: rtlwifi: remove always-true condition pointed out by GCC 12 > > On Mon, 23 May 2022 02:35:32 +0000 Ping-Ke Shih wrote: > > This is a typo since initial commit. Correct it by > > - value[0] != NULL) > > + value[0][0] != 0) > > > > So, NACK this patch. > > Too, late, the patches were already applied, sorry. Please post a fixup. I have sent a patch to correct it: https://lore.kernel.org/linux-wireless/20220524003750.3989-1-pkshih@realtek.com/T/#u Please take it into net-next tree. Thank you Ping-Ke
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c index 51fe51bb0504..15e6a6aded31 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c @@ -2386,10 +2386,7 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD, "Just Read IQK Matrix reg for channel:%d....\n", channel); - if ((rtlphy->iqk_matrix[indexforchannel]. - value[0] != NULL) - /*&&(regea4 != 0) */) - _rtl92d_phy_patha_fill_iqk_matrix(hw, true, + _rtl92d_phy_patha_fill_iqk_matrix(hw, true, rtlphy->iqk_matrix[ indexforchannel].value, 0, (rtlphy->iqk_matrix[
The .value is a two-dim array, not a pointer. struct iqk_matrix_regs { bool iqk_done; long value[1][IQK_MATRIX_REG_NUM]; }; Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- CC: pkshih@realtek.com CC: kvalo@kernel.org CC: keescook@chromium.org CC: colin.king@intel.com CC: linux-wireless@vger.kernel.org --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)