From: Luciano Coelho <coelho@ti.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH wireless-next 18/20] ti: Use pr_<level>
Date: Fri, 15 Jun 2012 11:36:14 +0300 [thread overview]
Message-ID: <1339749374.4502.80.camel@cumari.coelho.fi> (raw)
In-Reply-To: <a4533db379be3689e3b29ed9b0d170263d875f7d.1339739416.git.joe@perches.com>
Hi Joe,
On Thu, 2012-06-14 at 22:53 -0700, Joe Perches wrote:
> Use a more current logging style.
>
> Convert printks to pr_<level>.
> Coalesce formats, align arguments.
>
> Add newlines to calls, remove from macros.
> Remove unnecessary duplicate newlines from calls.
> Remove spaces before newlines.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
As Johannes already mentioned, I have to also ask why do you need to do
this? I see the point, slightly, with the wl1251 code, because it is
still using printks, but with wlcore and friends, there's no functional
change.
[...]
> diff --git a/drivers/net/wireless/ti/wl1251/wl1251.h b/drivers/net/wireless/ti/wl1251/wl1251.h
> index 9d8f581..e4d0063 100644
> --- a/drivers/net/wireless/ti/wl1251/wl1251.h
> +++ b/drivers/net/wireless/ti/wl1251/wl1251.h
> @@ -54,22 +54,22 @@ enum {
>
> #define DEBUG_DUMP_LIMIT 1024
>
> -#define wl1251_error(fmt, arg...) \
> - printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
> +#define wl1251_err(fmt, arg...) \
> + pr_err(DRIVER_PREFIX "ERROR " fmt, ##arg)
>
> -#define wl1251_warning(fmt, arg...) \
> - printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
> +#define wl1251_warn(fmt, arg...) \
> + pr_warn(DRIVER_PREFIX "WARNING " fmt, ##arg)
>
> -#define wl1251_notice(fmt, arg...) \
> - printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)
> +#define wl1251_notice(fmt, arg...) \
> + pr_info(DRIVER_PREFIX fmt, ##arg)
>
> -#define wl1251_info(fmt, arg...) \
> - printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg)
> +#define wl1251_info(fmt, arg...) \
> + printk(KERN_DEBUG DRIVER_PREFIX fmt, ##arg)
>
> #define wl1251_debug(level, fmt, arg...) \
> - do { \
> + do { \
> if (level & DEBUG_LEVEL) \
> - printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \
> + printk(KERN_DEBUG DRIVER_PREFIX fmt, ##arg); \
> } while (0)
As mentioned above, this change here is acceptable, but removing the \n
from the macro and adding it at the end of each and every call is
useless and will just skew git-blame and make it harder to do rebase or
apply patches because of conflicts.
[...]
> diff --git a/drivers/net/wireless/ti/wlcore/debug.h b/drivers/net/wireless/ti/wlcore/debug.h
> index 6b800b3..83b72c2 100644
> --- a/drivers/net/wireless/ti/wlcore/debug.h
> +++ b/drivers/net/wireless/ti/wlcore/debug.h
> @@ -61,22 +61,22 @@ extern u32 wl12xx_debug_level;
>
> #define DEBUG_DUMP_LIMIT 1024
>
> -#define wl1271_error(fmt, arg...) \
> - pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
> +#define wl1271_err(fmt, arg...) \
> + pr_err(DRIVER_PREFIX "ERROR " fmt, ##arg)
>
> -#define wl1271_warning(fmt, arg...) \
> - pr_warning(DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
> +#define wl1271_warn(fmt, arg...) \
> + pr_warn(DRIVER_PREFIX "WARNING " fmt, ##arg)
Using pr_warn instead of pr_warning is pointless. pr_warning is the
main definition, actually, and pr_warn is just a "mirror".
> -#define wl1271_notice(fmt, arg...) \
> - pr_info(DRIVER_PREFIX fmt "\n", ##arg)
> +#define wl1271_notice(fmt, arg...) \
> + pr_info(DRIVER_PREFIX fmt, ##arg)
>
> -#define wl1271_info(fmt, arg...) \
> - pr_info(DRIVER_PREFIX fmt "\n", ##arg)
> +#define wl1271_info(fmt, arg...) \
> + pr_info(DRIVER_PREFIX fmt, ##arg)
>
> -#define wl1271_debug(level, fmt, arg...) \
> - do { \
> +#define wl1271_debug(level, fmt, arg...) \
> + do { \
> if (level & wl12xx_debug_level) \
> - pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \
> + pr_debug(DRIVER_PREFIX fmt, ##arg); \
> } while (0)
Again, moving the \n from the macro definition and changing all the
callers is an unnecessary, intrusive change.
We have wanted to change "wl1271" to "wl12xx" for a long time, but we
don't do it exactly because this means we need to change the calls
everywhere.
So, this is a NACK from me, unless you have a really good reason why
this change is needed.
--
Luca.
next prev parent reply other threads:[~2012-06-15 8:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 5:53 [PATCH wireless-next 00/20] " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 01/20] adm8211: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 02/20] airo_cs: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 03/20] at76c50x-usb: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 04/20] atmel: atmel_cs: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 05/20] b43: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 06/20] b43legacy: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 07/20] hostap: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 08/20] ipw2x00: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 09/20] libertas: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 10/20] libertas_tf: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 11/20] mac80211_hwsim: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 12/20] mwl8k: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 13/20] orinoco: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 14/20] p54: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 15/20] prism54: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 16/20] ray_cs: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 17/20] rtl818x: " Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 18/20] ti: " Joe Perches
2012-06-15 8:36 ` Luciano Coelho [this message]
2012-06-15 10:42 ` Joe Perches
2012-06-15 5:53 ` [PATCH wireless-next 19/20] wl3501_cs: " Joe Perches
2012-06-15 5:54 ` [PATCH wireless-next 20/20] zd_usb: " Joe Perches
2012-06-15 7:36 ` [PATCH wireless-next 00/20] " Johannes Berg
2012-06-15 10:48 ` Joe Perches
2012-06-15 22:50 ` Ted Ts'o
2012-06-15 23:37 ` Joe Perches
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=1339749374.4502.80.camel@cumari.coelho.fi \
--to=coelho@ti.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®