All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marco Cesati <marcocesati@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	linux-staging@lists.linux.dev
Subject: Re: Staging: rtl8723bs: proposed patchset: remove useless structs
Date: Mon, 22 Mar 2021 16:21:22 +0300	[thread overview]
Message-ID: <20210322132122.GF1717@kadam> (raw)
In-Reply-To: <20210322130921.o4voti2xkmbxonny@cesati.gmail.com>

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


      reply	other threads:[~2021-03-22 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 13:09 Staging: rtl8723bs: proposed patchset: remove useless structs Marco Cesati
2021-03-22 13:21 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210322132122.GF1717@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=marcocesati@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.