Re: [PATCH v3] Staging: rtl8723bs: Remove unnecessary comments.
From: Shreeya Patel
Date: Sun Oct 01 2017 - 03:45:43 EST
On Sun, 2017-10-01 at 09:42 +1100, Tobin C. Harding wrote:
> On Sat, Sep 30, 2017 at 07:41:11PM +0530, Shreeya Patel wrote:
> >
> > Remove unnecessary comments which are there
> > to explain why call to memset is in comments. Both of the
> > comments are not needed as they are not very useful.
> >
> >
> > Signed-off-by: Shreeya Patel <shreeya.patel23498@xxxxxxxxx>
> > ---
> > Changes in v2:
> > Â -Remove some more unnecessary comments and make the
> > ÂÂÂcommit message more appropriate.
> >
> > Changes in v3:
> > Â -Make the commit message in imperative form.
> Well done. You forgot the period on the commit subject. Here is a
> blog post you might like (it is
> not kernel specific but useful still IMO).
>
> Good luck,
> Tobin.
I did the necessary changes and have sent it as v4.
Thanks.
>
> >
> > Âdrivers/staging/rtl8723bs/core/rtw_mlme.cÂÂÂÂÂ| 3 ---
> > Âdrivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 3 ---
> > Âdrivers/staging/rtl8723bs/core/rtw_pwrctrl.cÂÂ| 2 --
> > Âdrivers/staging/rtl8723bs/core/rtw_recv.cÂÂÂÂÂ| 4 ----
> > Âdrivers/staging/rtl8723bs/core/rtw_xmit.cÂÂÂÂÂ| 3 ---
> > Â5 files changed, 15 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > index 6b77820..5b583f7 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > @@ -28,9 +28,6 @@ sint _rtw_init_mlme_priv(struct adapter
> > *padapter)
> >  struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> > Â sint res = _SUCCESS;
> > Â
> > - /*ÂÂWe don't need to memset padapter->XXX to zero, because
> > adapter is allocated by vzalloc(). */
> > - /* memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv));
> > */
> > -
> > Â pmlmepriv->nic_hdl = (u8 *)padapter;
> > Â
> > Â pmlmepriv->pscanned = NULL;
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> > b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> > index b6d137f..ca35c1c 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> > @@ -474,9 +474,6 @@ int init_mlme_ext_priv(struct adapter
> > *padapter)
> > Â struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
> > Â struct mlme_ext_info *pmlmeinfo = &(pmlmeext-
> > >mlmext_info);
> > Â
> > - /*ÂÂWe don't need to memset padapter->XXX to zero, because
> > adapter is allocated by vzalloc(). */
> > - /* memset((u8 *)pmlmeext, 0, sizeof(struct
> > mlme_ext_priv)); */
> > -
> > Â pmlmeext->padapter = padapter;
> > Â
> > Â /* fill_fwpriv(padapter, &(pmlmeext->fwpriv)); */
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> > b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> > index aabdaaf..820a061 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> > @@ -1193,8 +1193,6 @@ void rtw_init_pwrctrl_priv(struct adapter
> > *padapter)
> > Â
> > Âvoid rtw_free_pwrctrl_priv(struct adapter *adapter)
> > Â{
> > - /* memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct
> > pwrctrl_priv)); */
> > -
> > Â#ifdef CONFIG_PNO_SUPPORT
> > Â if (pwrctrlpriv->pnlo_info != NULL)
> > Â printk("****** pnlo_info memory leak********\n");
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c
> > b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > index 68a6303..73e6e41 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > @@ -46,9 +46,6 @@ sint _rtw_init_recv_priv(struct recv_priv
> > *precvpriv, struct adapter *padapter)
> > Â union recv_frame *precvframe;
> > Â sint res = _SUCCESS;
> > Â
> > - /*ÂÂWe don't need to memset padapter->XXX to zero, because
> > adapter is allocated by vzalloc(). */
> > - /* memset((unsigned char *)precvpriv, 0, sizeof
> > (structÂÂrecv_priv)); */
> > -
> > Â spin_lock_init(&precvpriv->lock);
> > Â
> > Â _rtw_init_queue(&precvpriv->free_recv_queue);
> > @@ -65,7 +62,6 @@ sint _rtw_init_recv_priv(struct recv_priv
> > *precvpriv, struct adapter *padapter)
> > Â res = _FAIL;
> > Â goto exit;
> > Â }
> > - /* memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME
> > * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ); */
> > Â
> > Â precvpriv->precv_frame_buf = (u8
> > *)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_frame_buf),
> > RXFRAME_ALIGN_SZ);
> > Â /* precvpriv->precv_frame_buf = precvpriv-
> > >pallocated_frame_buf + RXFRAME_ALIGN_SZ - */
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> > b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> > index 022f654..8cd05f8 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> > @@ -51,9 +51,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv
> > *pxmitpriv, struct adapter *padapter)
> > Â struct xmit_frame *pxframe;
> > Â sint res = _SUCCESS;
> > Â
> > - /*ÂÂWe don't need to memset padapter->XXX to zero, because
> > adapter is allocated by vzalloc(). */
> > - /* memset((unsigned char *)pxmitpriv, 0, sizeof(struct
> > xmit_priv)); */
> > -
> > Â spin_lock_init(&pxmitpriv->lock);
> > Â spin_lock_init(&pxmitpriv->lock_sctx);
> > Â sema_init(&pxmitpriv->xmit_sema, 0);