linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: rtl8723bs: little cleanup
@ 2021-07-30 14:54 Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 1/4] staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex Fabio Aiuto
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-07-30 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

This patch series does some little cleanup

Fabio Aiuto (4):
  staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex
  staging: rtl8723bs: remove unnecessary parentheses
  staging: rtl8723bs: align condition to match open parentheses
  staging: rtl8723bs: put condition parentheses at the end of a line

 drivers/staging/rtl8723bs/core/rtw_mlme.c         | 13 ++++++-------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c     |  8 ++++----
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c    |  2 +-
 drivers/staging/rtl8723bs/include/wlan_bssdef.h   |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c    | 12 ++++++------
 6 files changed, 19 insertions(+), 20 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex
  2021-07-30 14:54 [PATCH 0/4] staging: rtl8723bs: little cleanup Fabio Aiuto
@ 2021-07-30 14:54 ` Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses Fabio Aiuto
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-07-30 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

fix camel case issue in field Reserved in struct wlan_bssid_ex

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c         | 12 ++++++------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c     |  8 ++++----
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c    |  2 +-
 drivers/staging/rtl8723bs/include/wlan_bssdef.h   |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  2 +-
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c    | 12 ++++++------
 6 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index a0c19253095d..9f97986e8680 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -483,8 +483,8 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
 	}
 
 	if (update_ie) {
-		dst->Reserved[0] = src->Reserved[0];
-		dst->Reserved[1] = src->Reserved[1];
+		dst->reserved[0] = src->reserved[0];
+		dst->reserved[1] = src->reserved[1];
 		memcpy((u8 *)dst, (u8 *)src, get_wlan_bssid_ex_sz(src));
 	}
 
@@ -600,13 +600,13 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
 
 		pnetwork->last_scanned = jiffies;
 
-		/* target.Reserved[0]== 1, means that scanned network is a bcn frame. */
-		if ((pnetwork->network.ie_length > target->ie_length) && (target->Reserved[0] == 1))
+		/* target.reserved[0]== 1, means that scanned network is a bcn frame. */
+		if ((pnetwork->network.ie_length > target->ie_length) && (target->reserved[0] == 1))
 			update_ie = false;
 
 		/*  probe resp(3) > beacon(1) > probe req(2) */
-		if ((target->Reserved[0] != 2) &&
-			(target->Reserved[0] >= pnetwork->network.Reserved[0])
+		if ((target->reserved[0] != 2) &&
+			(target->reserved[0] >= pnetwork->network.reserved[0])
 			) {
 			update_ie = true;
 		} else {
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 07986eeafe08..375d2a742dd2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -3971,18 +3971,18 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
 	subtype = GetFrameSubType(pframe);
 
 	if (subtype == WIFI_BEACON) {
-		bssid->Reserved[0] = 1;
+		bssid->reserved[0] = 1;
 		ie_offset = _BEACON_IE_OFFSET_;
 	} else {
 		/*  FIXME : more type */
 		if (subtype == WIFI_PROBERSP) {
 			ie_offset = _PROBERSP_IE_OFFSET_;
-			bssid->Reserved[0] = 3;
+			bssid->reserved[0] = 3;
 		} else if (subtype == WIFI_PROBEREQ) {
 			ie_offset = _PROBEREQ_IE_OFFSET_;
-			bssid->Reserved[0] = 2;
+			bssid->reserved[0] = 2;
 		} else {
-			bssid->Reserved[0] = 0;
+			bssid->reserved[0] = 0;
 			ie_offset = _FIXED_IE_LENGTH_;
 		}
 	}
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 2a2a8634beb7..865a82d5cedb 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1223,7 +1223,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
 	subtype = GetFrameSubType(pframe) >> 4;
 
 	if (subtype == WIFI_BEACON)
-		bssid->Reserved[0] = 1;
+		bssid->reserved[0] = 1;
 
 	bssid->length = sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + len;
 
diff --git a/drivers/staging/rtl8723bs/include/wlan_bssdef.h b/drivers/staging/rtl8723bs/include/wlan_bssdef.h
index 530c95275c1e..eb38594c8f5c 100644
--- a/drivers/staging/rtl8723bs/include/wlan_bssdef.h
+++ b/drivers/staging/rtl8723bs/include/wlan_bssdef.h
@@ -156,7 +156,7 @@ struct wlan_bcn_info {
 struct wlan_bssid_ex {
 	u32  length;
 	NDIS_802_11_MAC_ADDRESS  mac_address;
-	u8  Reserved[2];/* 0]: IS beacon frame */
+	u8  reserved[2];/* 0]: IS beacon frame */
 	struct ndis_802_11_ssid  ssid;
 	u32  privacy;
 	long  rssi;/* in dBM, raw data , get from PHY) */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index dc23470fcdef..12b8e1773a84 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -305,7 +305,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
 	SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
 	/* pmlmeext->mgnt_seq++; */
 
-	if (pnetwork->network.Reserved[0] == 1) { /*  WIFI_BEACON */
+	if (pnetwork->network.reserved[0] == 1) { /*  WIFI_BEACON */
 		eth_broadcast_addr(pwlanhdr->addr1);
 		SetFrameSubType(pbuf, WIFI_BEACON);
 	} else {
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 1383f84a4425..19c5c7e8f403 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -84,7 +84,7 @@ static char *translate_scan(struct adapter *padapter,
 	u32 i = 0;
 	u8 bw_40MHz = 0, short_GI = 0;
 	u16 mcs_rate = 0, vht_data_rate = 0;
-	u8 ie_offset = (pnetwork->network.Reserved[0] == 2 ? 0 : 12);
+	u8 ie_offset = (pnetwork->network.reserved[0] == 2 ? 0 : 12);
 	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 	u8 ss, sq;
 
@@ -102,7 +102,7 @@ static char *translate_scan(struct adapter *padapter,
 	start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.ssid.ssid);
 
 	/* parsing HT_CAP_IE */
-	if (pnetwork->network.Reserved[0] == 2) { /*  Probe Request */
+	if (pnetwork->network.reserved[0] == 2) { /*  Probe Request */
 		p = rtw_get_ie(&pnetwork->network.ies[0], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.ie_length);
 	} else {
 		p = rtw_get_ie(&pnetwork->network.ies[12], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.ie_length-12);
@@ -140,7 +140,7 @@ static char *translate_scan(struct adapter *padapter,
 	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
 
 	  /* Add mode */
-	if (pnetwork->network.Reserved[0] == 2) { /*  Probe Request */
+	if (pnetwork->network.reserved[0] == 2) { /*  Probe Request */
 		cap = 0;
 	} else {
 		__le16 le_tmp;
@@ -211,7 +211,7 @@ static char *translate_scan(struct adapter *padapter,
 	start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_PARAM_LEN);
 
 	/* parsing WPA/WPA2 IE */
-	if (pnetwork->network.Reserved[0] != 2) { /*  Probe Request */
+	if (pnetwork->network.reserved[0] != 2) { /*  Probe Request */
 		u8 *buf;
 		u8 wpa_ie[255], rsn_ie[255];
 		u16 wpa_len = 0, rsn_len = 0;
@@ -274,7 +274,7 @@ static char *translate_scan(struct adapter *padapter,
 		u8 *ie_ptr;
 		total_ielen = pnetwork->network.ie_length - ie_offset;
 
-		if (pnetwork->network.Reserved[0] == 2) { /*  Probe Request */
+		if (pnetwork->network.reserved[0] == 2) { /*  Probe Request */
 			ie_ptr = pnetwork->network.ies;
 			total_ielen = pnetwork->network.ie_length;
 		} else {    /*  Beacon or Probe Respones */
@@ -324,7 +324,7 @@ static char *translate_scan(struct adapter *padapter,
 		if (!buf)
 			goto exit;
 
-		pos = pnetwork->network.Reserved;
+		pos = pnetwork->network.reserved;
 		memset(&iwe, 0, sizeof(iwe));
 		iwe.cmd = IWEVCUSTOM;
 		iwe.u.data.length = scnprintf(buf, MAX_WPA_IE_LEN, "fm =%02X%02X", pos[1], pos[0]);
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses
  2021-07-30 14:54 [PATCH 0/4] staging: rtl8723bs: little cleanup Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 1/4] staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex Fabio Aiuto
@ 2021-07-30 14:54 ` Fabio Aiuto
  2021-08-02 13:05   ` Dan Carpenter
  2021-07-30 14:54 ` [PATCH 3/4] staging: rtl8723bs: align condition to match open parentheses Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 4/4] staging: rtl8723bs: put condition parentheses at the end of a line Fabio Aiuto
  3 siblings, 1 reply; 7+ messages in thread
From: Fabio Aiuto @ 2021-07-30 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

fix the following checkpatch issues:

CHECK: Unnecessary parentheses around
'pnetwork->network.ie_length > target->ie_length'
33: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:604:
+		if ((pnetwork->network.ie_length >
target->ie_length) && (target->reserved[0] == 1))

CHECK: Unnecessary parentheses around
'target->reserved[0] == 1'
33: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:604:
+		if ((pnetwork->network.ie_length >
target->ie_length) && (target->reserved[0] == 1))

CHECK: Unnecessary parentheses around
'target->reserved[0] != 2'
39: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:608:
+		if ((target->reserved[0] != 2) &&
+			(target->reserved[0] >=
		pnetwork->network.reserved[0])
 			) {

CHECK: Unnecessary parentheses around
'target->reserved[0] >= pnetwork->network.reserved[0]'
39: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:608:
+		if ((target->reserved[0] != 2) &&
+			(target->reserved[0]
		>= pnetwork->network.reserved[0])
 			) {

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 9f97986e8680..df599c2009b3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -601,12 +601,12 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
 		pnetwork->last_scanned = jiffies;
 
 		/* target.reserved[0]== 1, means that scanned network is a bcn frame. */
-		if ((pnetwork->network.ie_length > target->ie_length) && (target->reserved[0] == 1))
+		if (pnetwork->network.ie_length > target->ie_length && target->reserved[0] == 1)
 			update_ie = false;
 
 		/*  probe resp(3) > beacon(1) > probe req(2) */
-		if ((target->reserved[0] != 2) &&
-			(target->reserved[0] >= pnetwork->network.reserved[0])
+		if (target->reserved[0] != 2 &&
+			target->reserved[0] >= pnetwork->network.reserved[0]
 			) {
 			update_ie = true;
 		} else {
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/4] staging: rtl8723bs: align condition to match open parentheses
  2021-07-30 14:54 [PATCH 0/4] staging: rtl8723bs: little cleanup Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 1/4] staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses Fabio Aiuto
@ 2021-07-30 14:54 ` Fabio Aiuto
  2021-07-30 14:54 ` [PATCH 4/4] staging: rtl8723bs: put condition parentheses at the end of a line Fabio Aiuto
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-07-30 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

fix following checkpatch issue:

CHECK: Alignment should match open parenthesis
54: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:609:
+		if (target->reserved[0] != 2 &&
+			target->reserved[0] >=
		pnetwork->network.reserved[0]

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index df599c2009b3..d3d068babb5e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -606,7 +606,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
 
 		/*  probe resp(3) > beacon(1) > probe req(2) */
 		if (target->reserved[0] != 2 &&
-			target->reserved[0] >= pnetwork->network.reserved[0]
+		    target->reserved[0] >= pnetwork->network.reserved[0]
 			) {
 			update_ie = true;
 		} else {
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/4] staging: rtl8723bs: put condition parentheses at the end of a line
  2021-07-30 14:54 [PATCH 0/4] staging: rtl8723bs: little cleanup Fabio Aiuto
                   ` (2 preceding siblings ...)
  2021-07-30 14:54 ` [PATCH 3/4] staging: rtl8723bs: align condition to match open parentheses Fabio Aiuto
@ 2021-07-30 14:54 ` Fabio Aiuto
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-07-30 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

put the closing parenthese at the end of a line

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index d3d068babb5e..5ed13bf765d2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -606,8 +606,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
 
 		/*  probe resp(3) > beacon(1) > probe req(2) */
 		if (target->reserved[0] != 2 &&
-		    target->reserved[0] >= pnetwork->network.reserved[0]
-			) {
+		    target->reserved[0] >= pnetwork->network.reserved[0]) {
 			update_ie = true;
 		} else {
 			update_ie = false;
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses
  2021-07-30 14:54 ` [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses Fabio Aiuto
@ 2021-08-02 13:05   ` Dan Carpenter
  2021-08-02 13:30     ` Fabio Aiuto
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2021-08-02 13:05 UTC (permalink / raw)
  To: Fabio Aiuto; +Cc: gregkh, hdegoede, Larry.Finger, linux-staging, linux-kernel


Please fold patches 2, 3 and 4 together.  It counts as one patch because
it's "tidying up the condition".

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses
  2021-08-02 13:05   ` Dan Carpenter
@ 2021-08-02 13:30     ` Fabio Aiuto
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-08-02 13:30 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, hdegoede, Larry.Finger, linux-staging, linux-kernel

Hello Dan,

On Mon, Aug 02, 2021 at 04:05:51PM +0300, Dan Carpenter wrote:
> 
> Please fold patches 2, 3 and 4 together.  It counts as one patch because
> it's "tidying up the condition".
> 
> regards,
> dan carpenter
> 

ok I will next time I'll be submitting a similar cleaning,
they are already in staging-next...

thank you,

fabio

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-02 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 14:54 [PATCH 0/4] staging: rtl8723bs: little cleanup Fabio Aiuto
2021-07-30 14:54 ` [PATCH 1/4] staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex Fabio Aiuto
2021-07-30 14:54 ` [PATCH 2/4] staging: rtl8723bs: remove unnecessary parentheses Fabio Aiuto
2021-08-02 13:05   ` Dan Carpenter
2021-08-02 13:30     ` Fabio Aiuto
2021-07-30 14:54 ` [PATCH 3/4] staging: rtl8723bs: align condition to match open parentheses Fabio Aiuto
2021-07-30 14:54 ` [PATCH 4/4] staging: rtl8723bs: put condition parentheses at the end of a line Fabio Aiuto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).