Thread (5 messages) 5 messages, 2 authors, 2021-08-30

[PATCH 3/3] staging: r8188eu: remove unnecessary type casts

From: Michael Straube <hidden>
Date: 2021-08-29 11:26:20
Also in: lkml
Subsystem: staging subsystem, the rest · Maintainers: Greg Kroah-Hartman, Linus Torvalds

The field rx_data of struct recv_frame and the local variable pframe
both have type (u8 *). Remove unnecessary type casts to (unsigned char *).

Signed-off-by: Michael Straube <redacted>
---
 drivers/staging/r8188eu/core/rtw_security.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 0836f38ca284..48f77c6cf43c 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -145,7 +145,7 @@ void rtw_wep_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
 	struct	rx_pkt_attrib	 *prxattrib = &precvframe->attrib;
 	struct	security_priv	*psecuritypriv = &padapter->securitypriv;
 
-	pframe = (unsigned char *)precvframe->rx_data;
+	pframe = precvframe->rx_data;
 
 	/* start to decrypt recvframe */
 	if ((prxattrib->encrypt == _WEP40_) || (prxattrib->encrypt == _WEP104_)) {
@@ -600,7 +600,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
 	struct	security_priv	*psecuritypriv = &padapter->securitypriv;
 	u32		res = _SUCCESS;
 
-	pframe = (unsigned char *)precvframe->rx_data;
+	pframe = precvframe->rx_data;
 
 	/* 4 start to decrypt recvframe */
 	if (prxattrib->encrypt == _TKIP_) {
@@ -1412,7 +1412,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
 	struct	security_priv	*psecuritypriv = &padapter->securitypriv;
 	u32	res = _SUCCESS;
 
-	pframe = (unsigned char *)precvframe->rx_data;
+	pframe = precvframe->rx_data;
 
 	/* 4 start to encrypt each fragment */
 	if (prxattrib->encrypt == _AES_) {
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help