staging: rtw_mlme_ext: remove hardcoded dead debug code
PATCH 1/1 staging: rtw_mlme_ext: remove hardcoded dead debug code
The debug code is guarded by a constant false condition and is never executed. Remove it to simplify the code.
No functional change.
Signed-off-by SAJJA EASWAR SAI <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -9
@@ -1865,15 +1865,6 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precvdefault :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.52.0
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi SAJJA,
kernel test robot noticed the following build warnings:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/SAJJA-EASWAR-SAI/staging-rtw_mlme_ext-remove-hardcoded-dead-debug-code/20260130-143203 base: staging/staging-testing patch link: https://lore.kernel.org/r/20260130062956.858992-1-eshwarsajja20%40gmail.com patch subject: [PATCH] staging: rtw_mlme_ext: remove hardcoded dead debug code config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20260130/[email protected]/config) compiler: m68k-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260130/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function 'OnAction_sa_query':
>> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1851:31: warning: unused variable 'pattrib' [-Wunused-variable]
1851 | struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
| ^~~~~~~vim +/pattrib +1851 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
554c0a3abf216c Hans de Goede 2017-03-29 1847
554c0a3abf216c Hans de Goede 2017-03-29 1848 unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv_frame)
554c0a3abf216c Hans de Goede 2017-03-29 1849 {
554c0a3abf216c Hans de Goede 2017-03-29 1850 u8 *pframe = precv_frame->u.hdr.rx_data;
554c0a3abf216c Hans de Goede 2017-03-29 @1851 struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
554c0a3abf216c Hans de Goede 2017-03-29 1852 struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
554c0a3abf216c Hans de Goede 2017-03-29 1853 unsigned short tid;
554c0a3abf216c Hans de Goede 2017-03-29 1854
554c0a3abf216c Hans de Goede 2017-03-29 1855 switch (pframe[WLAN_HDR_A3_LEN+1]) {
554c0a3abf216c Hans de Goede 2017-03-29 1856 case 0: /* SA Query req */
554c0a3abf216c Hans de Goede 2017-03-29 1857 memcpy(&tid, &pframe[WLAN_HDR_A3_LEN+2], sizeof(unsigned short));
554c0a3abf216c Hans de Goede 2017-03-29 1858 issue_action_SA_Query(padapter, GetAddr2Ptr(pframe), 1, tid);
554c0a3abf216c Hans de Goede 2017-03-29 1859 break;
554c0a3abf216c Hans de Goede 2017-03-29 1860
554c0a3abf216c Hans de Goede 2017-03-29 1861 case 1: /* SA Query rsp */
8fa7292fee5c52 Thomas Gleixner 2025-04-05 1862 timer_delete_sync(&pmlmeext->sa_query_timer);
554c0a3abf216c Hans de Goede 2017-03-29 1863 break;
554c0a3abf216c Hans de Goede 2017-03-29 1864 default:
554c0a3abf216c Hans de Goede 2017-03-29 1865 break;
554c0a3abf216c Hans de Goede 2017-03-29 1866 }
554c0a3abf216c Hans de Goede 2017-03-29 1867 return _SUCCESS;
554c0a3abf216c Hans de Goede 2017-03-29 1868 }
554c0a3abf216c Hans de Goede 2017-03-29 1869 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki