[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1292534579.29894.77.camel@Joe-Laptop>
Date: Thu, 16 Dec 2010 13:22:59 -0800
From: Joe Perches <joe@...ches.com>
To: Kristian Larsson <kristian@...itelink.net>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: pktgen IP address stepping
On Thu, 2010-12-16 at 22:11 +0100, Kristian Larsson wrote:
> On Thu, Dec 16, 2010 at 10:02:12AM -0800, Joe Perches wrote:
> > pr_<foo> calls are already prefixed with pktgen via pr_fmt,
> > you don't need to add it to the format string.
> I can see at least two different cases of debug statements;
> if (debug)
> pr_info("Delay set at: %llu ns\n", pkt_dev->delay);
> if (debug)
> printk(KERN_DEBUG "pktgen: dst_min set to: %s\n",
> pkt_dev->dst_min);
> what's the reasoning behind using one or the other?
pr_info(fmt, ...) emits at KERN_INFO level and uses pr_fmt(fmt)
printk(KERN_DEBUG emits at KERN_DEBUG level and doesn't use pr_fmt
pr_debug(fmt, ...) does use pr_fmt and is optionally compiled.
I can't say why the author decided to use a info level output
for the delay set message. Maybe that person doesn't like to see
KERN_DEBUG messages.
cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists