diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-07-06 21:05:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-08 12:23:29 -0700 |
commit | c1641862f88367602f8f34a17b21bdf1eee912ee (patch) | |
tree | 22cf98b87d41bf5437ca8fcf7d53f29ebc544809 /drivers/staging/batman-adv/main.c | |
parent | 84ec08640786592a045b783fb28b542415521bf9 (diff) | |
download | op-kernel-dev-c1641862f88367602f8f34a17b21bdf1eee912ee.zip op-kernel-dev-c1641862f88367602f8f34a17b21bdf1eee912ee.tar.gz |
Staging: batman-adv: Move printk to simplified macros
Each general printk which is not informative by itself for a specific
batX device were moved to pr_(info|warning|err) as it provides an easy
interface which for example resolves the problem to add the prefix
"batman-adv: " before each line.
All information which is specific to a batX device will be printed using
a bat_(info|err|warning) macro to prefix it also with "batman-adv:
batX:" in each line.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/main.c')
-rw-r--r-- | drivers/staging/batman-adv/main.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 5477d42..a4d238b 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -87,16 +87,14 @@ int init_module(void) interface_setup); if (!soft_device) { - printk(KERN_ERR "batman-adv:" - "Unable to allocate the batman interface\n"); + pr_err("Unable to allocate the batman interface\n"); goto end; } retval = register_netdev(soft_device); if (retval < 0) { - printk(KERN_ERR "batman-adv:" - "Unable to register the batman interface: %i\n", retval); + pr_err("Unable to register the batman interface: %i\n", retval); goto free_soft_device; } @@ -113,9 +111,9 @@ int init_module(void) register_netdevice_notifier(&hard_if_notifier); dev_add_pack(&batman_adv_packet_type); - printk(KERN_INFO "batman-adv:" - "B.A.T.M.A.N. advanced %s%s (compatibility version %i) loaded\n", - SOURCE_VERSION, REVISION_VERSION_STR, COMPAT_VERSION); + pr_info("B.A.T.M.A.N. advanced %s%s (compatibility version %i) " + "loaded\n", SOURCE_VERSION, REVISION_VERSION_STR, + COMPAT_VERSION); return 0; @@ -176,8 +174,7 @@ void activate_module(void) goto end; err: - printk(KERN_ERR "batman-adv:" - "Unable to allocate memory for mesh information structures: " + pr_err("Unable to allocate memory for mesh information structures: " "out of mem ?\n"); deactivate_module(); end: |