Re: [PATCH 20/21] ntb_netdev: improve logging

From: Joe Perches
Date: Sat Jan 19 2013 - 13:50:50 EST


On Sat, 2013-01-19 at 02:02 -0700, Jon Mason wrote:
> Improve driver logging to be more helpful
[]
> diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
[]
> @@ -408,6 +408,5 @@ static void __exit ntb_netdev_exit_module(void)
> {
> ntb_unregister_client(&ntb_netdev_client);
> ntb_unregister_client_dev(KBUILD_MODNAME);
> - pr_info("%s: Driver removed\n", KBUILD_MODNAME);

It's almost always true that using
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include

and changing all pr_<level>( uses from

pr_<level>("s: etc...", KBUiLD_MODNAME, ...)
to
pr_<level>("etc...", ...)

produces overall smaller object code.
That's even more likely for 64 bit compiled code.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/