public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: simran singhal <singhalsimran0@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: ieee80211: Convert printks to pr_<level>
Date: Wed, 21 Jun 2017 09:31:11 -0700	[thread overview]
Message-ID: <1498062671.3337.1.camel@perches.com> (raw)
In-Reply-To: <20170621121932.GA24891@singhal-Inspiron-5558>

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/

  reply	other threads:[~2017-06-21 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 12:19 [PATCH] staging: rtl8192u: ieee80211: Convert printks to pr_<level> simran singhal
2017-06-21 16:31 ` Joe Perches [this message]
2017-06-23 16:34 ` Greg Kroah-Hartman

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=1498062671.3337.1.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=singhalsimran0@gmail.com \
    /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