[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150531213121.GA27465@kroah.com>
Date: Mon, 1 Jun 2015 06:31:21 +0900
From: Greg KH <gregkh@...uxfoundation.org>
To: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
Cc: dan.carpenter@...cle.com, joe@...ches.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 09/34] staging: rtl8192e: Remove RTLLIB_DEBUG_WX()
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@...il.com>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists