[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1498062671.3337.1.camel@perches.com>
Date: Wed, 21 Jun 2017 09:31:11 -0700
From: Joe Perches <joe@...ches.com>
To: simran singhal <singhalsimran0@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: ieee80211: Convert printks to
pr_<level>
On Wed, 2017-06-21 at 17:49 +0530, simran singhal wrote:
> Use the current logging style.
> Coalesce formats where appropriate.
[]
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
[]
> @@ -236,8 +236,8 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
>
> #ifdef NOT_YET
> if (ieee->iw_mode == IW_MODE_MASTER) {
> - printk(KERN_DEBUG "%s: Master mode not yet supported.\n",
> - ieee->dev->name);
> + pr_debug("%s: Master mode not yet supported.\n",
> + ieee->dev->name);
FYI 1:
Conversions of
printk(KERN_DEBUG ...)
to
pr_debug(...)
are not equivalent.
The first one is always placed into the object code
and emitted when the logging level is set appropriately.
The second one is only emitted if dynamic_debug is enabled
or if a #define DEBUG is set.
You should mention this change in the changelog.
In any case, for this code only, I think it's probably OK.
FYI 2:
There is a script that does these conversions and a few
other things: https://lwn.net/Articles/380161/
Powered by blists - more mailing lists