aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-09 09:35:16 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-16 13:22:58 -0500
commit020f01ebd04f3429c32586d90598c9f59e54ca7d (patch)
treee36b2cd4fecf609610eea15ab8bc07e1a34a469c /drivers/isdn
parent3654654f7aa79a37dde130afb7409c55b11807e7 (diff)
drivers/isdn/mISDN: Use printf extension %pV
Using %pV reduces the number of printk calls and eliminates any possible message interleaving from other printk calls. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/layer1.c10
-rw-r--r--drivers/isdn/mISDN/layer2.c12
-rw-r--r--drivers/isdn/mISDN/tei.c23
3 files changed, 33 insertions, 12 deletions
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index ac4aa18c632b..5cc7c001c523 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -99,12 +99,16 @@ static void
99l1m_debug(struct FsmInst *fi, char *fmt, ...) 99l1m_debug(struct FsmInst *fi, char *fmt, ...)
100{ 100{
101 struct layer1 *l1 = fi->userdata; 101 struct layer1 *l1 = fi->userdata;
102 struct va_format vaf;
102 va_list va; 103 va_list va;
103 104
104 va_start(va, fmt); 105 va_start(va, fmt);
105 printk(KERN_DEBUG "%s: ", dev_name(&l1->dch->dev.dev)); 106
106 vprintk(fmt, va); 107 vaf.fmt = fmt;
107 printk("\n"); 108 vaf.va = &va;
109
110 printk(KERN_DEBUG "%s: %pV\n", dev_name(&l1->dch->dev.dev), &vaf);
111
108 va_end(va); 112 va_end(va);
109} 113}
110 114
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index c97371788764..4ae75053c9d2 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -95,14 +95,20 @@ static void
95l2m_debug(struct FsmInst *fi, char *fmt, ...) 95l2m_debug(struct FsmInst *fi, char *fmt, ...)
96{ 96{
97 struct layer2 *l2 = fi->userdata; 97 struct layer2 *l2 = fi->userdata;
98 struct va_format vaf;
98 va_list va; 99 va_list va;
99 100
100 if (!(*debug & DEBUG_L2_FSM)) 101 if (!(*debug & DEBUG_L2_FSM))
101 return; 102 return;
103
102 va_start(va, fmt); 104 va_start(va, fmt);
103 printk(KERN_DEBUG "l2 (sapi %d tei %d): ", l2->sapi, l2->tei); 105
104 vprintk(fmt, va); 106 vaf.fmt = fmt;
105 printk("\n"); 107 vaf.va = &va;
108
109 printk(KERN_DEBUG "l2 (sapi %d tei %d): %pV\n",
110 l2->sapi, l2->tei, &vaf);
111
106 va_end(va); 112 va_end(va);
107} 113}
108 114
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 1b85d9d27496..687c9b6264ab 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -79,14 +79,19 @@ static void
79da_debug(struct FsmInst *fi, char *fmt, ...) 79da_debug(struct FsmInst *fi, char *fmt, ...)
80{ 80{
81 struct manager *mgr = fi->userdata; 81 struct manager *mgr = fi->userdata;
82 struct va_format vaf;
82 va_list va; 83 va_list va;
83 84
84 if (!(*debug & DEBUG_L2_TEIFSM)) 85 if (!(*debug & DEBUG_L2_TEIFSM))
85 return; 86 return;
87
86 va_start(va, fmt); 88 va_start(va, fmt);
87 printk(KERN_DEBUG "mgr(%d): ", mgr->ch.st->dev->id); 89
88 vprintk(fmt, va); 90 vaf.fmt = fmt;
89 printk("\n"); 91 vaf.va = &va;
92
93 printk(KERN_DEBUG "mgr(%d): %pV\n", mgr->ch.st->dev->id, &vaf);
94
90 va_end(va); 95 va_end(va);
91} 96}
92 97
@@ -223,14 +228,20 @@ static void
223tei_debug(struct FsmInst *fi, char *fmt, ...) 228tei_debug(struct FsmInst *fi, char *fmt, ...)
224{ 229{
225 struct teimgr *tm = fi->userdata; 230 struct teimgr *tm = fi->userdata;
231 struct va_format vaf;
226 va_list va; 232 va_list va;
227 233
228 if (!(*debug & DEBUG_L2_TEIFSM)) 234 if (!(*debug & DEBUG_L2_TEIFSM))
229 return; 235 return;
236
230 va_start(va, fmt); 237 va_start(va, fmt);
231 printk(KERN_DEBUG "sapi(%d) tei(%d): ", tm->l2->sapi, tm->l2->tei); 238
232 vprintk(fmt, va); 239 vaf.fmt = fmt;
233 printk("\n"); 240 vaf.va = &va;
241
242 printk(KERN_DEBUG "sapi(%d) tei(%d): %pV\n",
243 tm->l2->sapi, tm->l2->tei, &vaf);
244
234 va_end(va); 245 va_end(va);
235} 246}
236 247