public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed?
@ 2021-09-18 13:31 Michael Straube
  2021-09-18 16:46 ` Larry Finger
  2021-09-20  8:33 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Straube @ 2021-09-18 13:31 UTC (permalink / raw)
  To: Larry.Finger, Phillip Potter
  Cc: Greg KH, open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

Hi Larry, Phillip and all.

While removing code that checks for the chip type I stumbled upon this:


void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm)
{
	if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
		return;

	if (pDM_Odm->SupportICType == ODM_RTL8188E) {
		/*  ??? */
		/*  This part need to be redefined. */
	}
}


(pDM_Odm->SupportICType == ODM_RTL8188E) is always true in this driver.
Currently the function does nothing and the driver seems to work fine.
Because of the comment I'm not sure if the whole function can just be
removed?

Regards,
Michael

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

* Re: staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed?
  2021-09-18 13:31 staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed? Michael Straube
@ 2021-09-18 16:46 ` Larry Finger
  2021-09-18 17:32   ` Michael Straube
  2021-09-20  8:33 ` Dan Carpenter
  1 sibling, 1 reply; 4+ messages in thread
From: Larry Finger @ 2021-09-18 16:46 UTC (permalink / raw)
  To: Michael Straube, Phillip Potter
  Cc: Greg KH, open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On 9/18/21 08:31, Michael Straube wrote:
> Hi Larry, Phillip and all.
> 
> While removing code that checks for the chip type I stumbled upon this:
> 
> 
> void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm)
> {
>      if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
>          return;
> 
>      if (pDM_Odm->SupportICType == ODM_RTL8188E) {
>          /*  ??? */
>          /*  This part need to be redefined. */
>      }
> }
> 
> 
> (pDM_Odm->SupportICType == ODM_RTL8188E) is always true in this driver.
> Currently the function does nothing and the driver seems to work fine.
> Because of the comment I'm not sure if the whole function can just be
> removed?

Yes, I agree. No later driver does anything with this routine, thus it is dead 
and can be removed.

Larry


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

* Re: staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed?
  2021-09-18 16:46 ` Larry Finger
@ 2021-09-18 17:32   ` Michael Straube
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2021-09-18 17:32 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter
  Cc: Greg KH, open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On 9/18/21 18:46, Larry Finger wrote:
> On 9/18/21 08:31, Michael Straube wrote:
>> Hi Larry, Phillip and all.
>>
>> While removing code that checks for the chip type I stumbled upon this:
>>
>>
>> void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm)
>> {
>>      if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
>>          return;
>>
>>      if (pDM_Odm->SupportICType == ODM_RTL8188E) {
>>          /*  ??? */
>>          /*  This part need to be redefined. */
>>      }
>> }
>>
>>
>> (pDM_Odm->SupportICType == ODM_RTL8188E) is always true in this driver.
>> Currently the function does nothing and the driver seems to work fine.
>> Because of the comment I'm not sure if the whole function can just be
>> removed?
> 
> Yes, I agree. No later driver does anything with this routine, thus it 
> is dead and can be removed.
> 
> Larry
> 

Ok, thank you.

Regards,
Michael

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

* Re: staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed?
  2021-09-18 13:31 staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed? Michael Straube
  2021-09-18 16:46 ` Larry Finger
@ 2021-09-20  8:33 ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-09-20  8:33 UTC (permalink / raw)
  To: Michael Straube
  Cc: Larry.Finger, Phillip Potter, Greg KH,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Sat, Sep 18, 2021 at 03:31:48PM +0200, Michael Straube wrote:
> Hi Larry, Phillip and all.
> 
> While removing code that checks for the chip type I stumbled upon this:
> 
> 
> void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm)
> {
> 	if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
> 		return;
> 
> 	if (pDM_Odm->SupportICType == ODM_RTL8188E) {
> 		/*  ??? */
> 		/*  This part need to be redefined. */
> 	}
> }

Always just delete dead code.  The future is very hard to predict so
don't leave things lying around because of possible futures.  Don't be
a hoarder.

regards,
dan carpenter


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

end of thread, other threads:[~2021-09-20  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-18 13:31 staging: r8188eu: Can odm_DynamicTxPowerNIC() be removed? Michael Straube
2021-09-18 16:46 ` Larry Finger
2021-09-18 17:32   ` Michael Straube
2021-09-20  8:33 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox