On Mon, Mar 22, 2021 at 02:09:21PM +0100, Marco Cesati wrote: > The staging/rtl8723bs driver code includes 83 unnecessary struct > definitions (never referenced in the code). Here there are: > > cfg80211_wifidirect_info tdls_info tdls_txmgmt P2P_PS_Offload_t > P2P_PS_CTWPeriod_t usb_suspend_parm getbasicrate_rsp getdatarate_rsp > readBB_parm readBB_rsp readTSSI_parm readTSSI_rsp writeBB_parm > readRF_parm readRF_rsp writeRF_parm getrfintfs_parm settxagctbl_parm > gettxagctbl_parm gettxagctbl_rsp setagcctrl_parm setssup_parm > getssup_parm getssup_rsp setssdlevel_parm getssdlevel_parm > getssdlevel_rsp setssulevel_parm getssulevel_parm getssulevel_rsp > setratable_parm getratable_parm getratable_rsp gettxretrycnt_parm > gettxretrycnt_rsp getrxretrycnt_parm getrxretrycnt_rsp getbcnokcnt_parm > getbcnokcnt_rsp getbcnerrcnt_parm getbcnerrcnt_rsp getcurtxpwrlevel_parm > getcurtxpwrlevel_rsp setprobereqextraie_parm setassocreqextraie_parm > setproberspextraie_parm setassocrspextraie_parm smooth_rssi_data > specific_device_id BSSIDInfo ndis_802_11_association_information > ndis_802_11_key ndis_802_11_remove_key iocmd_struct rf_reg_param > bb_reg_param wowlan_ioctl_param addba_event c2hevent_queue > phystatus_8723b sha256_state country_code_to_enum_rd reg_protocol_rd > reg_protocol_wt rtw_ieee80211_bar r_antenna_select_ofdm agg_pkt_info > ieee_ibss_seq ieee80211_rx_stats ieee80211_frag_entry ieee80211_stats > ieee80211_softmac_stats ieee80211_security ieee80211_header_data > phy_status_rpt_8812_t odm_sta_info_t odm_ra_info_t > > Should I submit a patchset that removes all of these definitions? > Yeah. Delete anything that isn't used. Once in a while we have stuff like: #define enable 0x1 #define disable 0x2 #define reset 0x3 So it's like a list of commands that we pass to the hardware. And maybe we never use the reset command. But it's still useful to know that it's 0x3 so the unused define serves as hardware documentation. But this sort of define as hardware documentation isn't common. Generally if something isn't used, then delete it. regards, dan carpenter