All of lore.kernel.org
 help / color / mirror / Atom feed
* Staging: rtl8723bs: proposed patchset: remove useless structs
@ 2021-03-22 13:09 Marco Cesati
  2021-03-22 13:21 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Cesati @ 2021-03-22 13:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Hans de Goede, Larry Finger, linux-staging

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?

Best regards,

Marco

---- 
Marco Cesati, PhD
Dept. of Civil Engineering and Computer Science Engineering
Univ. of Rome Tor Vergata
via del Politecnico 1, I-00133 Rome, Italy
Tel. +39 06 7259 7389

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Staging: rtl8723bs: proposed patchset: remove useless structs
  2021-03-22 13:09 Staging: rtl8723bs: proposed patchset: remove useless structs Marco Cesati
@ 2021-03-22 13:21 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-03-22 13:21 UTC (permalink / raw)
  To: Marco Cesati
  Cc: Greg Kroah-Hartman, Hans de Goede, Larry Finger, linux-staging

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-22 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 13:09 Staging: rtl8723bs: proposed patchset: remove useless structs Marco Cesati
2021-03-22 13:21 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.