All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: karthik alapati <mail@karthek.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove obsolete commented out code
Date: Thu, 11 Feb 2021 10:53:56 +0300	[thread overview]
Message-ID: <20210211075356.GC2696@kadam> (raw)
In-Reply-To: <YCQvsdlnbnQN4Ruf@karthik-strix-linux.karthek.com>

On Thu, Feb 11, 2021 at 12:40:41AM +0530, karthik alapati wrote:
> fix some checkpatch "Block comments use * on subsequent lines"
> warnings and remove obsolete code
> 

This isn't the correct commit message.  It should say something like:
"There is a bunch of messy, commented out code.  Just delete it."


> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: karthik alapati <mail@karthek.com>
> ---
>  .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   | 44 ++++---------------
>  1 file changed, 9 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> index 1fd504181..3d22bd304 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> @@ -57,8 +57,6 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
>  	return 0;
>  #endif
>  
> -	/* RT_TRACE(COMP_RF, DBG_TRACE, ("--->PHY_QueryBBReg(): RegAddr(%#lx), BitMask(%#lx)\n", RegAddr, BitMask)); */
> -
>  	OriginalValue = rtw_read32(Adapter, RegAddr);
>  	BitShift = phy_CalculateBitShift(BitMask);
>  
> @@ -94,8 +92,6 @@ void PHY_SetBBReg_8723B(
>  	return;
>  #endif
>  
> -	/* RT_TRACE(COMP_RF, DBG_TRACE, ("--->PHY_SetBBReg(): RegAddr(%#lx), BitMask(%#lx), Data(%#lx)\n", RegAddr, BitMask, Data)); */
> -
>  	if (BitMask != bMaskDWord) { /* if not "double word" write */
>  		OriginalValue = rtw_read32(Adapter, RegAddr);
>  		BitShift = phy_CalculateBitShift(BitMask);
> @@ -159,13 +155,9 @@ static u32 phy_RFSerialRead_8723B(
>  	if (RfPiEnable) {
>  		/*  Read from BBreg8b8, 12 bits for 8190, 20bits for T65 RF */
>  		retValue = PHY_QueryBBReg(Adapter, pPhyReg->rfLSSIReadBackPi|MaskforPhySet, bLSSIReadBackData);
> -
> -		/* RT_DISP(FINIT, INIT_RF, ("Readback from RF-PI : 0x%x\n", retValue)); */
>  	} else {
>  		/* Read from BBreg8a0, 12 bits for 8190, 20 bits for T65 RF */
>  		retValue = PHY_QueryBBReg(Adapter, pPhyReg->rfLSSIReadBack|MaskforPhySet, bLSSIReadBackData);
> -
> -		/* RT_DISP(FINIT, INIT_RF, ("Readback from RF-SI : 0x%x\n", retValue)); */
>  	}
>  	return retValue;
>  
> @@ -230,15 +222,13 @@ static void phy_RFSerialWrite_8723B(
>  	/*  */
>  	/*  Put write addr in [5:0]  and write data in [31:16] */
>  	/*  */
> -	/* DataAndAddr = (Data<<16) | (NewOffset&0x3f); */
> -	DataAndAddr = ((NewOffset<<20) | (Data&0x000fffff)) & 0x0fffffff;	/*  T65 RF */
> +	DataAndAddr = ((NewOffset<<20) | (Data&0x000fffff)) & 0x0fffffff;
> +	/*  T65 RF */

The patch is supposed to be deleting code so we don't want any + lines
which change code.  Only deletes.  Also don't put the coment after the
the code which it's commenting on.

> @@ -761,20 +745,20 @@ static void phy_PostSetBwMode8723B(struct adapter *Adapter)
>  
>  		PHY_SetBBReg(Adapter, rFPGA1_RFMOD, bRFMOD, 0x1);
>  
> -		/*  Set Control channel to upper or lower. These settings are required only for 40MHz */
> +		/**
> +		 * Set Control channel to upper or lower. These settings are required only
> +		 * for 40MHz
> +		 */

Yeah.  Get rid of these plus lines and resend.

regards,
dan carpenter


  parent reply	other threads:[~2021-02-11  7:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 19:10 [PATCH] staging: rtl8723bs: remove obsolete commented out code karthik alapati
2021-02-10 19:19 ` karthek
2021-02-11  7:42   ` Dan Carpenter
2021-02-11  7:53 ` Dan Carpenter [this message]
2021-02-11  7:57 ` Dan Carpenter
2021-02-11 10:30   ` karthek
2021-02-11 10:46     ` Greg Kroah-Hartman
2021-02-11 10:50       ` karthek

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=20210211075356.GC2696@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@karthek.com \
    --cc=sfr@canb.auug.org.au \
    /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.