Re: [PATCH 1/6] staging: rtl8188eu: use __func__ in hal8188e_rate_adaptive.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 28, 2018 at 06:29:01PM +0100, Michael Straube wrote:
> Use __func__ instead of hardcoded function names.
> Reported by checkpatch.
> 
> Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
> ---
>  .../rtl8188eu/hal/hal8188e_rate_adaptive.c    | 36 ++++++++++---------
>  1 file changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c b/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c
> index 6dbd7d261f1e..02f423accee8 100644
> --- a/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c
> +++ b/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c
> @@ -127,10 +127,10 @@ static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm,
>  	u8 i;
>  
>  	ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE,
> -			ODM_DBG_TRACE, ("=====>odm_RateDown_8188E()\n"));
> +			ODM_DBG_TRACE, ("=====>%s()\n", __func__));

This printk has no information that you couldn't get using ftrace.

>  	if (!pRaInfo) {
>  		ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
> -				("odm_RateDown_8188E(): pRaInfo is NULL\n"));
> +				("%s(): pRaInfo is NULL\n", __func__));

It pRaInfo is never NULL so this is dead code.  A lot of this trace
output could just be deleted.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux