Re: [PATCH v5 09/34] staging: rtl8192e: Remove RTLLIB_DEBUG_WX()

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

 



On Sun, May 31, 2015 at 08:19:28PM +0200, Mateusz Kulikowski wrote:
> Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
> Rewrite some messages to be more readable.
> 
> Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@xxxxxxxxx>
> ---
>  drivers/staging/rtl8192e/rtllib.h    |  1 -
>  drivers/staging/rtl8192e/rtllib_wx.c | 33 ++++++++++++++++-----------------
>  2 files changed, 16 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
> index 42c37f8..392bcd5 100644
> --- a/drivers/staging/rtl8192e/rtllib.h
> +++ b/drivers/staging/rtl8192e/rtllib.h
> @@ -703,7 +703,6 @@ do {								\
>  #define RTLLIB_DL_ERR	   (1<<31)
>  #define RTLLIB_DEBUG_INFO(f, a...)   RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
>  
> -#define RTLLIB_DEBUG_WX(f, a...)     RTLLIB_DEBUG(RTLLIB_DL_WX, f, ## a)
>  #define RTLLIB_DEBUG_SCAN(f, a...)   RTLLIB_DEBUG(RTLLIB_DL_SCAN, f, ## a)
>  #define RTLLIB_DEBUG_STATE(f, a...)  RTLLIB_DEBUG(RTLLIB_DL_STATE, f, ## a)
>  #define RTLLIB_DEBUG_MGMT(f, a...)  RTLLIB_DEBUG(RTLLIB_DL_MGMT, f, ## a)
> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
> index 6234aae..c2c5f0d 100644
> --- a/drivers/staging/rtl8192e/rtllib_wx.c
> +++ b/drivers/staging/rtl8192e/rtllib_wx.c
> @@ -266,7 +266,7 @@ int rtllib_wx_get_scan(struct rtllib_device *ieee,
>  	int i = 0;
>  	int err = 0;
>  
> -	RTLLIB_DEBUG_WX("Getting scan\n");
> +	netdev_dbg(ieee->dev, "Getting scan\n");
>  	down(&ieee->wx_sem);
>  	spin_lock_irqsave(&ieee->lock, flags);
>  
> @@ -293,7 +293,7 @@ int rtllib_wx_get_scan(struct rtllib_device *ieee,
>  	wrqu->data.length = ev -  extra;
>  	wrqu->data.flags = 0;
>  
> -	RTLLIB_DEBUG_WX("exit: %d networks returned.\n", i);
> +	netdev_dbg(ieee->dev, "%s(): %d networks returned.\n", __func__, i);
>  
>  	return err;
>  }
> @@ -311,7 +311,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
>  	int i, key, key_provided, len;
>  	struct lib80211_crypt_data **crypt;
>  
> -	RTLLIB_DEBUG_WX("SET_ENCODE\n");
> +	netdev_dbg(ieee->dev, "%s()\n", __func__);

Why are you adding __func__?  Stuff like this, that is obviously a
"trace" function can just be deleted.

No error message should be showing the function name as it should be
"obvious" as to what driver / device that this message came from, which
is wht the netdev_* calls provide.  So the function name is just extra
noise.

I'll take these patches, but removing these types of things would be
good to do in future patches.

thanks,

greg k-h
_______________________________________________
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