Skip to contentSkip to conversation

staging: rtl8723bs: remove dead code in rtw_mlme_ext.c

PATCH In review Fu Zang 2 participants 2 messages Jan 31 – Feb 7 Staging

lore
Share & tools
lore

Fu Zang

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove dead code in rtw_mlme_ext.c

This patch removes a block of code guarded by if (0). It appears to be leftover debug code that manually prints packet hex dumps.

The kernel has standard facilities for hex dumps (print_hex_dump), and keeping dead code with manual loops serves no purpose.

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -8
index ac49bfbaa5bb..0700d4318cd8 100644
@@ -1865,14 +1865,6 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv
 	default:
 		break;
 	}
-	if (0) {
-		int pp;
-
-		netdev_dbg(padapter->pnetdev, "pattrib->pktlen = %d =>", pattrib->pkt_len);
-		for (pp = 0; pp < pattrib->pkt_len; pp++)
-			pr_cont(" %02x ", pframe[pp]);
-		pr_cont("\n");
-	}
 
 	return _SUCCESS;
 }
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 34 lines · Fu Zang

This patch removes a block of code guarded by if (0). It appears to be leftover debug code that manually prints packet hex dumps.

The kernel has standard facilities for hex dumps (print_hex_dump), and keeping dead code with manual loops serves no purpose.

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -8
index ac49bfbaa5bb..0700d4318cd8 100644
@@ -1865,14 +1865,6 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv
 	default:
 		break;
 	}
-	if (0) {
-		int pp;
-
-		netdev_dbg(padapter->pnetdev, "pattrib->pktlen = %d =>", pattrib->pkt_len);
-		for (pp = 0; pp < pattrib->pkt_len; pp++)
-			pr_cont(" %02x ", pframe[pp]);
-		pr_cont("\n");
-	}
 
 	return _SUCCESS;
 }
Signature · 1 line
2.43.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- Your patch did not apply to any known trees that Greg is in control of. Possibly this is because you made it against Linus's tree, not the linux-next tree, which is where all of the development for the next version of the kernel is at. Please refresh your patch against the linux-next tree, or even better yet, the development tree specified in the MAINTAINERS file for the subsystem you are submitting a patch for, and resend it.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot