staging: rtl8723bs: include: Eliminate p
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
@@ -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
@@ -305,7 +305,7 @@ struct recv_bufstruct adapter *adapter;u8 *pbuf; -u8 *pallocated_buf; +u8 *allocated_buf;u32 len;u8 *phead;
drivers/staging/rtl8723bs/include/rtw_xmit.h +1 -1
@@ -252,7 +252,7 @@ struct xmit_bufstruct adapter *padapter; -u8 *pallocated_buf; +u8 *allocated_buf;u8 *pbuf;
Signature · 1 line
2.17.1
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
Signed-off-by Vatsala Narang <[email protected]>---
changes in v3:
-no changechanges in v2:
-added this to patchsetdrivers/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@@ -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@@ -305,7 +305,7 @@ struct recv_bufstruct adapter *adapter;u8 *pbuf; -u8 *pallocated_buf; +u8 *allocated_buf;u32 len;u8 *phead;drivers/staging/rtl8723bs/include/rtw_xmit.h +1
-2@@ -252,7 +252,7 @@ struct xmit_bufstruct 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.
Quoted 20 lines
Again, you are only changing the definitions of the structures, and not their uses. Doing grep for
pallocated_bufshows four uses inos_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 themp_txtype a bit. It seems to be only used in the definition of themp_privestructure inrtw_mp.h. Grepping formp_privonly shows uses inrtw_mp.h. These are the definition, a function prototype in a comment, and as a substring in the names of two functionsinit_mp_privandfree_mp_priv.So it seems that all of this can be dropped:
- The entiremp_txstructure definition
- The entiremp_privstructure defintion
- The comment about the prototype ofalloc_mp_xmitframe
- The prototype ofinit_mp_priv
- The prototype offree_mp_priv
Quoted 6 lines
It would be good to do a similar check on the
recv_bufstructure, 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