netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, jhs@mojatatu.com, stephen@networkplumber.org
Subject: Re: [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...)
Date: Thu, 07 Nov 2013 18:43:35 +0400	[thread overview]
Message-ID: <527BA717.5060301@cogentembedded.com> (raw)
In-Reply-To: <1383790412-41944-4-git-send-email-yangyingliang@huawei.com>

Hello.

On 07-11-2013 6:13, Yang Yingliang wrote:

> Replace printk(KERN_DEBUG ...) with pr_debug() and

    Note that this is not an equivalent change: first variant always prints 
the message, while pr_debug() only does this if DEBUG is #define'd or dynamic 
debugging is enabled.

> replace pr_warning() with pr_warn().

    This should probably be in a separate patch.

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>   net/sched/sch_cbq.c    | 2 +-
>   net/sched/sch_dsmark.c | 2 +-
>   net/sched/sch_gred.c   | 4 ++--
>   net/sched/sch_htb.c    | 6 +++---
>   4 files changed, 7 insertions(+), 7 deletions(-)

> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
> index a8f40f5..9e3a9dc 100644
> --- a/net/sched/sch_cbq.c
> +++ b/net/sched/sch_cbq.c
> @@ -1060,7 +1060,7 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>   			}
>   			if (cl->quantum <= 0 ||
>   				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
> -				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
> +				pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>   					   cl->common.classid, cl->quantum);

    You should also adjust indentation of the continuation line. Same comment 
to the code furhter below...

[...]
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index f6e8a74..6586f3b 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c

> @@ -1484,13 +1484,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
>   	if (!cl->level) {
>   		cl->quantum = hopt->rate.rate / q->rate2quantum;
>   		if (!hopt->quantum && cl->quantum < 1000) {
> -			pr_warning(
> +			pr_warn(
>   			       "HTB: quantum of class %X is small. Consider r2q change.\n",

    It would have been good if you moved the string literal to the preceding 
line. Same comment to the below code.

WBR, Sergei

      parent reply	other threads:[~2013-11-07 14:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
2013-11-07 14:25   ` Sergei Shtylyov
2013-11-08  1:40     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
2013-11-07  8:37   ` Daniel Borkmann
2013-11-08 11:04     ` Bjørn Mork
2013-11-07 14:33   ` Sergei Shtylyov
2013-11-08  1:51     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
2013-11-07  8:30   ` Daniel Borkmann
2013-11-07  8:43     ` Yang Yingliang
2013-11-07 14:43   ` Sergei Shtylyov [this message]

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=527BA717.5060301@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=yangyingliang@huawei.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;
as well as URLs for NNTP newsgroup(s).