From: Joe Perches <joe@perches.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] firewire: net: prefix all log messages with interface name
Date: Sat, 18 Feb 2012 13:32:22 -0800 [thread overview]
Message-ID: <1329600742.1753.20.camel@joe2Laptop> (raw)
In-Reply-To: <20120218220233.5d67b31a@stein>
On Sat, 2012-02-18 at 22:02 +0100, Stefan Richter wrote:
> Change the log line prefix from "firewire_net: " to
> "firewire_net firewire0: " etc. for the case that several RFC 2734
> interfaces are being used in the same machine.
Why not just "firewireX: " ?
[]
> +#define fwnet_notice(net, fmt, args...) \
> + printk(KERN_NOTICE "%s %s: " fmt, KBUILD_MODNAME, (net)->name, ## args)
> +#define fwnet_err(net, fmt, args...) \
> + printk(KERN_ERR "%s %s: " fmt, KBUILD_MODNAME, (net)->name, ## args)
Adding code for the "%s:...", KBUILD_MODNAME rarely saves
overall space. Did you try embedding KBUILD_MODNAME
without the "%s: " and comparing the size?
Perhaps just add pr_fmt and pr_<level>?
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* (if really necessary) */
and
#define fwnet_notice(net, fmt, ...) \
pr_notice("%s: " fmt, (net)->name, ##__VA_ARGS__)
#define fwnet_err(net, fmt, ...) \
pr_err("%s: " fmt, (net)->name, ##__VA_ARGS__)
next prev parent reply other threads:[~2012-02-18 21:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-18 20:58 [PATCH 0/4] firewire, some more logging related patches Stefan Richter
2012-02-18 21:01 ` [PATCH 1/4] firewire: sbp2: identify to driver core as "firewire_sbp2", not "sbp2" Stefan Richter
2012-02-18 21:01 ` [PATCH 2/4] firewire: net: identify to driver core as "firewire_net", not "net" Stefan Richter
2012-02-18 21:02 ` [PATCH 3/4] firewire: net: prefix all log messages with interface name Stefan Richter
2012-02-18 21:32 ` Joe Perches [this message]
2012-02-19 11:48 ` Stefan Richter
2012-02-18 21:03 ` [PATCH 4/4] firewire: core: prefix log messages with card name Stefan Richter
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=1329600742.1753.20.camel@joe2Laptop \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/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