Skip to contentSkip to conversation

staging: rtl8723bs: remove shadowed bDumpRxPkt declaration

PATCH In review Yuho Choi 4 participants 5 messages Apr 20 Staging

lore
Share & tools
lore

Yuho Choi

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove shadowed bDumpRxPkt declaration

DBG_RX_DUMP_EAP redeclares bDumpRxPkt inside validate_recv_frame(), shadowing the existing function-local variable. Drop the inner declaration and reuse the existing variable to avoid unnecessary shadowing.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -1
index 337671b1211f0..cf5698dda91fc 100644
@@ -1534,7 +1534,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 			precvpriv->rx_drop++;
 		} else if (retval == _SUCCESS) {
 #ifdef DBG_RX_DUMP_EAP
-			u8 bDumpRxPkt;
 			u16 eth_type;
 
 			/*  dump eapol */
Signature · 1 line
2.50.1 (Apple Git-155)
#1 lore raw
Quoted 11 lines · Yuho Choi

DBG_RX_DUMP_EAP redeclares bDumpRxPkt inside validate_recv_frame(), shadowing the existing function-local variable. Drop the inner declaration and reuse the existing variable to avoid unnecessary shadowing.

You are kidding me...

Quoted 2 lines
 drivers/staging/rtl8723bs/core/rtw_recv.c | 1 -
 1 file changed, 1 deletion(-)

^^^^^^^^

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Yuho Choi
Quoted 20 lines · Yuho Choi

DBG_RX_DUMP_EAP redeclares bDumpRxPkt inside validate_recv_frame(), shadowing the existing function-local variable. Drop the inner declaration and reuse the existing variable to avoid unnecessary shadowing.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -0
index 337671b1211f0..cf5698dda91fc 100644

drivers/staging/rtl8723bs/core/rtw_recv.c static signed int validate_recv_frame(struct adapter *adapter, union recv_frame · line 1537

Quoted 4 lines
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -1
@@ -1534,7 +1534,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 			precvpriv->rx_drop++;
 		} else if (retval == _SUCCESS) {
 #ifdef DBG_RX_DUMP_EAP
-			u8 bDumpRxPkt;

If you trace this back, why is this variable being used at all? Look at how it is being used, and please explain the logic here.

Personally, I think this can be deleted entirely, but please verify this.

thanks,

greg k-h

#3 lore raw
In reply to Yuho Choi
Quoted 11 lines · Yuho Choi

DBG_RX_DUMP_EAP redeclares bDumpRxPkt inside validate_recv_frame(), shadowing the existing function-local variable. Drop the inner declaration and reuse the existing variable to avoid unnecessary shadowing.

Could you explain why there are so many SOB here for such a simple change?

Thanks,

ET

Quoted 16 lines
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -1
index 337671b1211f0..cf5698dda91fc 100644
@@ -1534,7 +1534,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 			precvpriv->rx_drop++;
 		} else if (retval == _SUCCESS) {
 #ifdef DBG_RX_DUMP_EAP
-			u8 bDumpRxPkt;
 			u16 eth_type;
 
 			/*  dump eapol */
author
#4 lore raw

Dear Greg, Andy, Ethan,

Thanks for the feedback.

This patch came from an ongoing research project with my fellow researchers, and I included
the SOBs to reflect that collaboration. After reviewing the Linux patch submission conventions
again, I agree that these tags should be limited to people who directly contributed to the
specific patch itself. For this patch, that attribution was too broad. I will be more careful about
that in future submissions.

I also understand the concern about the patch itself. I will trace the logic more carefully.

Best regards,
Yuho Choi

Quoted 38 lines · Ethan Tidmore
Quoted 11 lines · Yuho Choi

DBG_RX_DUMP_EAP redeclares bDumpRxPkt inside validate_recv_frame(), shadowing the existing function-local variable. Drop the inner declaration and reuse the existing variable to avoid unnecessary shadowing.

Could you explain why there are so many SOB here for such a simple change?

Thanks,

ET

Quoted 16 lines
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +0 -1
index 337671b1211f0..cf5698dda91fc 100644
@@ -1534,7 +1534,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
                      precvpriv->rx_drop++;
              } else if (retval == _SUCCESS) {
 #ifdef DBG_RX_DUMP_EAP
-                     u8 bDumpRxPkt;
                      u16 eth_type;
 
                      /*  dump eapol */