aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoechr.c
diff options
context:
space:
mode:
authorEd L. Cashin <ecashin@coraid.com>2006-09-20 14:36:49 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 15:53:50 -0400
commit6bb6285fdb948cedee586c6bebc9ebc5e32a5c35 (patch)
tree775bff808343ef52d1b254a9e33144f13a197a45 /drivers/block/aoe/aoechr.c
parent19bf26353c50bc2be375109ec73f2f0bbd616ed1 (diff)
aoe: clean up printks via macros
Use simple macros to clean up the printks. (This patch is reverted by the 14th patch to follow.) Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/aoe/aoechr.c')
-rw-r--r--drivers/block/aoe/aoechr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 2b5256cc733d..f5cab69fbc91 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -55,9 +55,7 @@ static int
55interfaces(const char __user *str, size_t size) 55interfaces(const char __user *str, size_t size)
56{ 56{
57 if (set_aoe_iflist(str, size)) { 57 if (set_aoe_iflist(str, size)) {
58 printk(KERN_CRIT 58 eprintk("could not set interface list: too many interfaces\n");
59 "%s: could not set interface list: %s\n",
60 __FUNCTION__, "too many interfaces");
61 return -EINVAL; 59 return -EINVAL;
62 } 60 }
63 return 0; 61 return 0;
@@ -80,8 +78,7 @@ revalidate(const char __user *str, size_t size)
80 /* should be e%d.%d format */ 78 /* should be e%d.%d format */
81 n = sscanf(buf, "e%d.%d", &major, &minor); 79 n = sscanf(buf, "e%d.%d", &major, &minor);
82 if (n != 2) { 80 if (n != 2) {
83 printk(KERN_ERR "aoe: %s: invalid device specification\n", 81 eprintk("invalid device specification\n");
84 __FUNCTION__);
85 return -EINVAL; 82 return -EINVAL;
86 } 83 }
87 d = aoedev_by_aoeaddr(major, minor); 84 d = aoedev_by_aoeaddr(major, minor);
@@ -116,7 +113,7 @@ bail: spin_unlock_irqrestore(&emsgs_lock, flags);
116 113
117 mp = kmalloc(n, GFP_ATOMIC); 114 mp = kmalloc(n, GFP_ATOMIC);
118 if (mp == NULL) { 115 if (mp == NULL) {
119 printk(KERN_CRIT "aoe: aoechr_error: allocation failure, len=%ld\n", n); 116 eprintk("allocation failure, len=%ld\n", n);
120 goto bail; 117 goto bail;
121 } 118 }
122 119
@@ -141,7 +138,7 @@ aoechr_write(struct file *filp, const char __user *buf, size_t cnt, loff_t *offp
141 138
142 switch ((unsigned long) filp->private_data) { 139 switch ((unsigned long) filp->private_data) {
143 default: 140 default:
144 printk(KERN_INFO "aoe: aoechr_write: can't write to that file.\n"); 141 iprintk("can't write to that file.\n");
145 break; 142 break;
146 case MINOR_DISCOVER: 143 case MINOR_DISCOVER:
147 ret = discover(); 144 ret = discover();
@@ -250,7 +247,7 @@ aoechr_init(void)
250 247
251 n = register_chrdev(AOE_MAJOR, "aoechr", &aoe_fops); 248 n = register_chrdev(AOE_MAJOR, "aoechr", &aoe_fops);
252 if (n < 0) { 249 if (n < 0) {
253 printk(KERN_ERR "aoe: aoechr_init: can't register char device\n"); 250 eprintk("can't register char device\n");
254 return n; 251 return n;
255 } 252 }
256 sema_init(&emsgs_sema, 0); 253 sema_init(&emsgs_sema, 0);