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/vis.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/vis.c')
-rw-r--r-- | drivers/staging/batman-adv/vis.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index ddee0f2..4b6a5045 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -678,7 +678,7 @@ static void send_vis_packet(struct vis_info *info) int packet_length; if (info->packet.ttl < 2) { - printk(KERN_WARNING "batman-adv: Error - can't send vis packet: ttl exceeded\n"); + pr_warning("Error - can't send vis packet: ttl exceeded\n"); return; } @@ -740,13 +740,13 @@ int vis_init(void) vis_hash = hash_new(256, vis_info_cmp, vis_info_choose); if (!vis_hash) { - printk(KERN_ERR "batman-adv:Can't initialize vis_hash\n"); + pr_err("Can't initialize vis_hash\n"); goto err; } my_vis_info = kmalloc(1000, GFP_ATOMIC); if (!my_vis_info) { - printk(KERN_ERR "batman-adv:Can't initialize vis packet\n"); + pr_err("Can't initialize vis packet\n"); goto err; } @@ -767,8 +767,7 @@ int vis_init(void) memcpy(my_vis_info->packet.sender_orig, main_if_addr, ETH_ALEN); if (hash_add(vis_hash, my_vis_info) < 0) { - printk(KERN_ERR - "batman-adv:Can't add own vis packet into hash\n"); + pr_err("Can't add own vis packet into hash\n"); /* not in hash, need to remove it manually. */ kref_put(&my_vis_info->refcount, free_info); goto err; |