Messages in this thread | | | Subject | Re: [PATCH 3/4] firewire: net: prefix all log messages with interface name | From | Joe Perches <> | Date | Sat, 18 Feb 2012 13:32:22 -0800 |
| |
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__)
| |