Skip to contentSkip to conversation

staging: rtl8712: Fix multiple line dereference

PATCH In review Shibo Li 3 participants 3 messages Feb 20, 2023 Staging

lore
Share & tools
lore

Shibo Li

author
#0 lore raw

PATCH 1/1 staging: rtl8712: Fix multiple line dereference

This patch fixes the following warning in rtl871x_mlme.c

WARNING: Avoid multiple line dereference - prefer 'adapter->securitypriv.PrivacyAlgrthm'

---
 drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_mlme.c +2 -2
index 63e12b157001..cc47c1cedd4e 100644
@@ -773,8 +773,8 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
 						adapter->securitypriv.busetkipkey = false;
 						adapter->securitypriv.bgrpkey_handshake = false;
 						ptarget_sta->ieee8021x_blocked = true;
-						ptarget_sta->XPrivacy = adapter->
-						securitypriv.PrivacyAlgrthm;
+						ptarget_sta->XPrivacy =
+							adapter->securitypriv.PrivacyAlgrthm;
 						memset((u8 *)&ptarget_sta->x_UncstKey,
 							 0,
 							 sizeof(union Keytype));
Signature · 1 line
2.39.2
Tested-by on v1 1/1
#2 lore raw
In reply to Shibo Li
Quoted 14 lines · Shibo Li

This patch fixes the following warning in rtl871x_mlme.c

WARNING: Avoid multiple line dereference - prefer 'adapter->securitypriv.PrivacyAlgrthm'

---
  drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_mlme.c +0 -0
index 63e12b157001..cc47c1cedd4e 100644

drivers/staging/rtl8712/rtl871x_mlme.c void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf) · line 780

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_mlme.c +2 -2
@@ -773,8 +773,8 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
  						adapter->securitypriv.busetkipkey = false;
  						adapter->securitypriv.bgrpkey_handshake = false;
  						ptarget_sta->ieee8021x_blocked = true;
-						ptarget_sta->XPrivacy = adapter->
-						securitypriv.PrivacyAlgrthm;
+						ptarget_sta->XPrivacy =
+							adapter->securitypriv.PrivacyAlgrthm;
  						memset((u8 *)&ptarget_sta->x_UncstKey,
  							 0,
  							 sizeof(union Keytype));