Skip to contentSkip to conversation

staging: rtl8723bs: include: Eliminate p

PATCH In review Vatsala Narang 2 participants 3 messages Mar 23, 2019 – Mar 24, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/3 staging: rtl8723bs: include: Eliminate p

Getting rid of p's from pointer's name

---
changes in v3:
-no change

changes in v2:
-added this to patchset

 drivers/staging/rtl8723bs/include/rtw_mp.h   | 2 +-
 drivers/staging/rtl8723bs/include/rtw_recv.h | 2 +-
 drivers/staging/rtl8723bs/include/rtw_xmit.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_mp.h +1 -1
index bb3970d58573..a2fe98153297 100644
@@ -44,7 +44,7 @@ struct mp_tx
 	/* struct tx_desc desc; */
 	/* u8 resvdtx[7]; */
 	u8 desc[TXDESC_SIZE];
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 	u8 *buf;
 	u32 buf_size, write_size;
 	void *PktTxThread;
drivers/staging/rtl8723bs/include/rtw_recv.h +1 -1
index 7d54cf211315..b4ac00e2ba43 100644
@@ -305,7 +305,7 @@ struct recv_buf
 	struct adapter *adapter;
 
 	u8 *pbuf;
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 
 	u32 len;
 	u8 *phead;
drivers/staging/rtl8723bs/include/rtw_xmit.h +1 -1
index 1b38b9182b31..6e4e047ad5cc 100644
@@ -252,7 +252,7 @@ struct xmit_buf
 
 	struct adapter *padapter;
 
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 
 	u8 *pbuf;
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 1 line · Vatsala Narang

Getting rid of p's from pointer's name

Again, you are only changing the definitions of the structures, and not their uses. Doing grep for pallocated_buf shows four uses in os_dep/xmit_linux.c.

On the other hand, all of them are in xmit_bufs. There seem to be no uses of the fields of the other types. I looked into the use of the mp_tx type a bit. It seems to be only used in the definition of the mp_prive structure in rtw_mp.h. Grepping for mp_priv only shows uses in rtw_mp.h. These are the definition, a function prototype in a comment, and as a substring in the names of two functions init_mp_priv and free_mp_priv.

So it seems that all of this can be dropped:
- The entire mp_tx structure definition
- The entire mp_priv structure defintion
- The comment about the prototype of alloc_mp_xmitframe
- The prototype of init_mp_priv
- The prototype of free_mp_priv

It would be good to do a similar check on the recv_buf structure, to see if it is ever used.

julia

Quoted 63 lines

---
changes in v3:
-no change

changes in v2:
-added this to patchset

 drivers/staging/rtl8723bs/include/rtw_mp.h   | 2 +-
 drivers/staging/rtl8723bs/include/rtw_recv.h | 2 +-
 drivers/staging/rtl8723bs/include/rtw_xmit.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_mp.h +1 -1
index bb3970d58573..a2fe98153297 100644
@@ -44,7 +44,7 @@ struct mp_tx
 	/* struct tx_desc desc; */
 	/* u8 resvdtx[7]; */
 	u8 desc[TXDESC_SIZE];
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 	u8 *buf;
 	u32 buf_size, write_size;
 	void *PktTxThread;
drivers/staging/rtl8723bs/include/rtw_recv.h +1 -1
index 7d54cf211315..b4ac00e2ba43 100644
@@ -305,7 +305,7 @@ struct recv_buf
 	struct adapter *adapter;
 
 	u8 *pbuf;
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 
 	u32 len;
 	u8 *phead;
drivers/staging/rtl8723bs/include/rtw_xmit.h +1 -2
index 1b38b9182b31..6e4e047ad5cc 100644
@@ -252,7 +252,7 @@ struct xmit_buf
 
 	struct adapter *padapter;
 
-	u8 *pallocated_buf;
+	u8 *allocated_buf;
 
 	u8 *pbuf;
 
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190323220542.9331-1-vatsalanarang%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
Quoted 20 lines

Again, you are only changing the definitions of the structures, and not their uses. Doing grep for pallocated_buf shows four uses in os_dep/xmit_linux.c.

On the other hand, all of them are in xmit_bufs. There seem to be no uses of the fields of the other types. I looked into the use of the mp_tx type a bit. It seems to be only used in the definition of the mp_prive structure in rtw_mp.h. Grepping for mp_priv only shows uses in rtw_mp.h. These are the definition, a function prototype in a comment, and as a substring in the names of two functions init_mp_priv and free_mp_priv.

So it seems that all of this can be dropped:
- The entire mp_tx structure definition
- The entire mp_priv structure defintion
- The comment about the prototype of alloc_mp_xmitframe
- The prototype of init_mp_priv
- The prototype of free_mp_priv

Quoted 6 lines

It would be good to do a similar check on the recv_buf structure, to see if it is ever used.

julia

Yes, I missed some steps in compilation so was unsure of their usage,now i
understand what you are saying.
so i will check their usage and drop them accordingly.
thanks for guidance
Vatsala