aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-09-13 17:52:04 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-13 20:02:50 -0400
commit35a4a5733b0a8290de39558b82896ab795b108a7 (patch)
treea4a1d7cc33205a1acb098cdba96e319ada715be6 /drivers/isdn
parenta2a69f0b35762410c4194f9827354310f68470be (diff)
isdn: clean up debug format string usage
Avoid unneeded local string buffers for constructing debug output. Also cleans up debug calls that contain a single parameter so that they cannot be accidentally parsed as format strings. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hisax/amd7930_fn.c4
-rw-r--r--drivers/isdn/hisax/avm_pci.c4
-rw-r--r--drivers/isdn/hisax/config.c2
-rw-r--r--drivers/isdn/hisax/diva.c4
-rw-r--r--drivers/isdn/hisax/elsa.c2
-rw-r--r--drivers/isdn/hisax/elsa_ser.c2
-rw-r--r--drivers/isdn/hisax/hfc_pci.c2
-rw-r--r--drivers/isdn/hisax/hfc_sx.c2
-rw-r--r--drivers/isdn/hisax/hscx_irq.c4
-rw-r--r--drivers/isdn/hisax/icc.c4
-rw-r--r--drivers/isdn/hisax/ipacx.c8
-rw-r--r--drivers/isdn/hisax/isac.c4
-rw-r--r--drivers/isdn/hisax/isar.c6
-rw-r--r--drivers/isdn/hisax/jade.c18
-rw-r--r--drivers/isdn/hisax/jade_irq.c4
-rw-r--r--drivers/isdn/hisax/l3_1tr6.c50
-rw-r--r--drivers/isdn/hisax/netjet.c2
-rw-r--r--drivers/isdn/hisax/q931.c6
-rw-r--r--drivers/isdn/hisax/w6692.c8
19 files changed, 57 insertions, 79 deletions
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
index 1063babe1d3a..36817e0a0b94 100644
--- a/drivers/isdn/hisax/amd7930_fn.c
+++ b/drivers/isdn/hisax/amd7930_fn.c
@@ -314,7 +314,7 @@ Amd7930_empty_Dfifo(struct IsdnCardState *cs, int flag)
314 314
315 t += sprintf(t, "Amd7930: empty_Dfifo cnt: %d |", cs->rcvidx); 315 t += sprintf(t, "Amd7930: empty_Dfifo cnt: %d |", cs->rcvidx);
316 QuickHex(t, cs->rcvbuf, cs->rcvidx); 316 QuickHex(t, cs->rcvbuf, cs->rcvidx);
317 debugl1(cs, cs->dlog); 317 debugl1(cs, "%s", cs->dlog);
318 } 318 }
319 /* moves received data in sk-buffer */ 319 /* moves received data in sk-buffer */
320 memcpy(skb_put(skb, cs->rcvidx), cs->rcvbuf, cs->rcvidx); 320 memcpy(skb_put(skb, cs->rcvidx), cs->rcvbuf, cs->rcvidx);
@@ -406,7 +406,7 @@ Amd7930_fill_Dfifo(struct IsdnCardState *cs)
406 406
407 t += sprintf(t, "Amd7930: fill_Dfifo cnt: %d |", count); 407 t += sprintf(t, "Amd7930: fill_Dfifo cnt: %d |", count);
408 QuickHex(t, deb_ptr, count); 408 QuickHex(t, deb_ptr, count);
409 debugl1(cs, cs->dlog); 409 debugl1(cs, "%s", cs->dlog);
410 } 410 }
411 /* AMD interrupts on */ 411 /* AMD interrupts on */
412 AmdIrqOn(cs); 412 AmdIrqOn(cs);
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index ee9b9a03cffa..d1427bd6452d 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -285,7 +285,7 @@ hdlc_empty_fifo(struct BCState *bcs, int count)
285 t += sprintf(t, "hdlc_empty_fifo %c cnt %d", 285 t += sprintf(t, "hdlc_empty_fifo %c cnt %d",
286 bcs->channel ? 'B' : 'A', count); 286 bcs->channel ? 'B' : 'A', count);
287 QuickHex(t, p, count); 287 QuickHex(t, p, count);
288 debugl1(cs, bcs->blog); 288 debugl1(cs, "%s", bcs->blog);
289 } 289 }
290} 290}
291 291
@@ -345,7 +345,7 @@ hdlc_fill_fifo(struct BCState *bcs)
345 t += sprintf(t, "hdlc_fill_fifo %c cnt %d", 345 t += sprintf(t, "hdlc_fill_fifo %c cnt %d",
346 bcs->channel ? 'B' : 'A', count); 346 bcs->channel ? 'B' : 'A', count);
347 QuickHex(t, p, count); 347 QuickHex(t, p, count);
348 debugl1(cs, bcs->blog); 348 debugl1(cs, "%s", bcs->blog);
349 } 349 }
350} 350}
351 351
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index bf04d2a3cf4a..b33f53b3ca93 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1896,7 +1896,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
1896 ptr--; 1896 ptr--;
1897 *ptr++ = '\n'; 1897 *ptr++ = '\n';
1898 *ptr = 0; 1898 *ptr = 0;
1899 HiSax_putstatus(cs, NULL, cs->dlog); 1899 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1900 } else 1900 } else
1901 HiSax_putstatus(cs, "LogEcho: ", 1901 HiSax_putstatus(cs, "LogEcho: ",
1902 "warning Frame too big (%d)", 1902 "warning Frame too big (%d)",
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index 8d0cf6e4dc00..4fc90de68d18 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -427,7 +427,7 @@ Memhscx_empty_fifo(struct BCState *bcs, int count)
427 t += sprintf(t, "hscx_empty_fifo %c cnt %d", 427 t += sprintf(t, "hscx_empty_fifo %c cnt %d",
428 bcs->hw.hscx.hscx ? 'B' : 'A', count); 428 bcs->hw.hscx.hscx ? 'B' : 'A', count);
429 QuickHex(t, ptr, count); 429 QuickHex(t, ptr, count);
430 debugl1(cs, bcs->blog); 430 debugl1(cs, "%s", bcs->blog);
431 } 431 }
432} 432}
433 433
@@ -469,7 +469,7 @@ Memhscx_fill_fifo(struct BCState *bcs)
469 t += sprintf(t, "hscx_fill_fifo %c cnt %d", 469 t += sprintf(t, "hscx_fill_fifo %c cnt %d",
470 bcs->hw.hscx.hscx ? 'B' : 'A', count); 470 bcs->hw.hscx.hscx ? 'B' : 'A', count);
471 QuickHex(t, ptr, count); 471 QuickHex(t, ptr, count);
472 debugl1(cs, bcs->blog); 472 debugl1(cs, "%s", bcs->blog);
473 } 473 }
474} 474}
475 475
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index 1df6f9a56ca2..2be1c8a3bb5f 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -535,7 +535,7 @@ check_arcofi(struct IsdnCardState *cs)
535 t = tmp; 535 t = tmp;
536 t += sprintf(tmp, "Arcofi data"); 536 t += sprintf(tmp, "Arcofi data");
537 QuickHex(t, p, cs->dc.isac.mon_rxp); 537 QuickHex(t, p, cs->dc.isac.mon_rxp);
538 debugl1(cs, tmp); 538 debugl1(cs, "%s", tmp);
539 if ((cs->dc.isac.mon_rxp == 2) && (cs->dc.isac.mon_rx[0] == 0xa0)) { 539 if ((cs->dc.isac.mon_rxp == 2) && (cs->dc.isac.mon_rx[0] == 0xa0)) {
540 switch (cs->dc.isac.mon_rx[1]) { 540 switch (cs->dc.isac.mon_rx[1]) {
541 case 0x80: 541 case 0x80:
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
index d4c98d330bfe..3f84dd8f1757 100644
--- a/drivers/isdn/hisax/elsa_ser.c
+++ b/drivers/isdn/hisax/elsa_ser.c
@@ -344,7 +344,7 @@ static inline void receive_chars(struct IsdnCardState *cs,
344 344
345 t += sprintf(t, "modem read cnt %d", cs->hw.elsa.rcvcnt); 345 t += sprintf(t, "modem read cnt %d", cs->hw.elsa.rcvcnt);
346 QuickHex(t, cs->hw.elsa.rcvbuf, cs->hw.elsa.rcvcnt); 346 QuickHex(t, cs->hw.elsa.rcvbuf, cs->hw.elsa.rcvcnt);
347 debugl1(cs, tmp); 347 debugl1(cs, "%s", tmp);
348 } 348 }
349 cs->hw.elsa.rcvcnt = 0; 349 cs->hw.elsa.rcvcnt = 0;
350} 350}
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 3ccd724ff8c2..497bd026c237 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -901,7 +901,7 @@ Begin:
901 ptr--; 901 ptr--;
902 *ptr++ = '\n'; 902 *ptr++ = '\n';
903 *ptr = 0; 903 *ptr = 0;
904 HiSax_putstatus(cs, NULL, cs->dlog); 904 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
905 } else 905 } else
906 HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", total - 3); 906 HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", total - 3);
907 } 907 }
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index dc4574f735ef..fa1fefd711cd 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -674,7 +674,7 @@ receive_emsg(struct IsdnCardState *cs)
674 ptr--; 674 ptr--;
675 *ptr++ = '\n'; 675 *ptr++ = '\n';
676 *ptr = 0; 676 *ptr = 0;
677 HiSax_putstatus(cs, NULL, cs->dlog); 677 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
678 } else 678 } else
679 HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", skb->len); 679 HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", skb->len);
680 } 680 }
diff --git a/drivers/isdn/hisax/hscx_irq.c b/drivers/isdn/hisax/hscx_irq.c
index f398d4838937..a8d6188402c6 100644
--- a/drivers/isdn/hisax/hscx_irq.c
+++ b/drivers/isdn/hisax/hscx_irq.c
@@ -75,7 +75,7 @@ hscx_empty_fifo(struct BCState *bcs, int count)
75 t += sprintf(t, "hscx_empty_fifo %c cnt %d", 75 t += sprintf(t, "hscx_empty_fifo %c cnt %d",
76 bcs->hw.hscx.hscx ? 'B' : 'A', count); 76 bcs->hw.hscx.hscx ? 'B' : 'A', count);
77 QuickHex(t, ptr, count); 77 QuickHex(t, ptr, count);
78 debugl1(cs, bcs->blog); 78 debugl1(cs, "%s", bcs->blog);
79 } 79 }
80} 80}
81 81
@@ -115,7 +115,7 @@ hscx_fill_fifo(struct BCState *bcs)
115 t += sprintf(t, "hscx_fill_fifo %c cnt %d", 115 t += sprintf(t, "hscx_fill_fifo %c cnt %d",
116 bcs->hw.hscx.hscx ? 'B' : 'A', count); 116 bcs->hw.hscx.hscx ? 'B' : 'A', count);
117 QuickHex(t, ptr, count); 117 QuickHex(t, ptr, count);
118 debugl1(cs, bcs->blog); 118 debugl1(cs, "%s", bcs->blog);
119 } 119 }
120} 120}
121 121
diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
index db5321f6379b..51dae9167238 100644
--- a/drivers/isdn/hisax/icc.c
+++ b/drivers/isdn/hisax/icc.c
@@ -134,7 +134,7 @@ icc_empty_fifo(struct IsdnCardState *cs, int count)
134 134
135 t += sprintf(t, "icc_empty_fifo cnt %d", count); 135 t += sprintf(t, "icc_empty_fifo cnt %d", count);
136 QuickHex(t, ptr, count); 136 QuickHex(t, ptr, count);
137 debugl1(cs, cs->dlog); 137 debugl1(cs, "%s", cs->dlog);
138 } 138 }
139} 139}
140 140
@@ -176,7 +176,7 @@ icc_fill_fifo(struct IsdnCardState *cs)
176 176
177 t += sprintf(t, "icc_fill_fifo cnt %d", count); 177 t += sprintf(t, "icc_fill_fifo cnt %d", count);
178 QuickHex(t, ptr, count); 178 QuickHex(t, ptr, count);
179 debugl1(cs, cs->dlog); 179 debugl1(cs, "%s", cs->dlog);
180 } 180 }
181} 181}
182 182
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 74feb5c83067..5faa5de24305 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -260,7 +260,7 @@ dch_empty_fifo(struct IsdnCardState *cs, int count)
260 260
261 t += sprintf(t, "dch_empty_fifo() cnt %d", count); 261 t += sprintf(t, "dch_empty_fifo() cnt %d", count);
262 QuickHex(t, ptr, count); 262 QuickHex(t, ptr, count);
263 debugl1(cs, cs->dlog); 263 debugl1(cs, "%s", cs->dlog);
264 } 264 }
265} 265}
266 266
@@ -307,7 +307,7 @@ dch_fill_fifo(struct IsdnCardState *cs)
307 307
308 t += sprintf(t, "dch_fill_fifo() cnt %d", count); 308 t += sprintf(t, "dch_fill_fifo() cnt %d", count);
309 QuickHex(t, ptr, count); 309 QuickHex(t, ptr, count);
310 debugl1(cs, cs->dlog); 310 debugl1(cs, "%s", cs->dlog);
311 } 311 }
312} 312}
313 313
@@ -539,7 +539,7 @@ bch_empty_fifo(struct BCState *bcs, int count)
539 539
540 t += sprintf(t, "bch_empty_fifo() B-%d cnt %d", hscx, count); 540 t += sprintf(t, "bch_empty_fifo() B-%d cnt %d", hscx, count);
541 QuickHex(t, ptr, count); 541 QuickHex(t, ptr, count);
542 debugl1(cs, bcs->blog); 542 debugl1(cs, "%s", bcs->blog);
543 } 543 }
544} 544}
545 545
@@ -582,7 +582,7 @@ bch_fill_fifo(struct BCState *bcs)
582 582
583 t += sprintf(t, "chb_fill_fifo() B-%d cnt %d", hscx, count); 583 t += sprintf(t, "chb_fill_fifo() B-%d cnt %d", hscx, count);
584 QuickHex(t, ptr, count); 584 QuickHex(t, ptr, count);
585 debugl1(cs, bcs->blog); 585 debugl1(cs, "%s", bcs->blog);
586 } 586 }
587} 587}
588 588
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index a365ccc1c99c..7fdf78f46433 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -137,7 +137,7 @@ isac_empty_fifo(struct IsdnCardState *cs, int count)
137 137
138 t += sprintf(t, "isac_empty_fifo cnt %d", count); 138 t += sprintf(t, "isac_empty_fifo cnt %d", count);
139 QuickHex(t, ptr, count); 139 QuickHex(t, ptr, count);
140 debugl1(cs, cs->dlog); 140 debugl1(cs, "%s", cs->dlog);
141 } 141 }
142} 142}
143 143
@@ -179,7 +179,7 @@ isac_fill_fifo(struct IsdnCardState *cs)
179 179
180 t += sprintf(t, "isac_fill_fifo cnt %d", count); 180 t += sprintf(t, "isac_fill_fifo cnt %d", count);
181 QuickHex(t, ptr, count); 181 QuickHex(t, ptr, count);
182 debugl1(cs, cs->dlog); 182 debugl1(cs, "%s", cs->dlog);
183 } 183 }
184} 184}
185 185
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index 7fdf34704fe5..f4956c73aa11 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -74,7 +74,7 @@ sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
74 t = tmp; 74 t = tmp;
75 t += sprintf(t, "sendmbox cnt %d", len); 75 t += sprintf(t, "sendmbox cnt %d", len);
76 QuickHex(t, &msg[len-i], (i > 64) ? 64 : i); 76 QuickHex(t, &msg[len-i], (i > 64) ? 64 : i);
77 debugl1(cs, tmp); 77 debugl1(cs, "%s", tmp);
78 i -= 64; 78 i -= 64;
79 } 79 }
80 } 80 }
@@ -105,7 +105,7 @@ rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
105 t = tmp; 105 t = tmp;
106 t += sprintf(t, "rcv_mbox cnt %d", ireg->clsb); 106 t += sprintf(t, "rcv_mbox cnt %d", ireg->clsb);
107 QuickHex(t, &msg[ireg->clsb - i], (i > 64) ? 64 : i); 107 QuickHex(t, &msg[ireg->clsb - i], (i > 64) ? 64 : i);
108 debugl1(cs, tmp); 108 debugl1(cs, "%s", tmp);
109 i -= 64; 109 i -= 64;
110 } 110 }
111 } 111 }
@@ -1248,7 +1248,7 @@ isar_int_main(struct IsdnCardState *cs)
1248 tp += sprintf(debbuf, "msg iis(%x) msb(%x)", 1248 tp += sprintf(debbuf, "msg iis(%x) msb(%x)",
1249 ireg->iis, ireg->cmsb); 1249 ireg->iis, ireg->cmsb);
1250 QuickHex(tp, (u_char *)ireg->par, ireg->clsb); 1250 QuickHex(tp, (u_char *)ireg->par, ireg->clsb);
1251 debugl1(cs, debbuf); 1251 debugl1(cs, "%s", debbuf);
1252 } 1252 }
1253 break; 1253 break;
1254 case ISAR_IIS_INVMSG: 1254 case ISAR_IIS_INVMSG:
diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c
index f946c58d8ab1..e2ae7871a209 100644
--- a/drivers/isdn/hisax/jade.c
+++ b/drivers/isdn/hisax/jade.c
@@ -81,10 +81,7 @@ modejade(struct BCState *bcs, int mode, int bc)
81 int jade = bcs->hw.hscx.hscx; 81 int jade = bcs->hw.hscx.hscx;
82 82
83 if (cs->debug & L1_DEB_HSCX) { 83 if (cs->debug & L1_DEB_HSCX) {
84 char tmp[40]; 84 debugl1(cs, "jade %c mode %d ichan %d", 'A' + jade, mode, bc);
85 sprintf(tmp, "jade %c mode %d ichan %d",
86 'A' + jade, mode, bc);
87 debugl1(cs, tmp);
88 } 85 }
89 bcs->mode = mode; 86 bcs->mode = mode;
90 bcs->channel = bc; 87 bcs->channel = bc;
@@ -257,23 +254,18 @@ void
257clear_pending_jade_ints(struct IsdnCardState *cs) 254clear_pending_jade_ints(struct IsdnCardState *cs)
258{ 255{
259 int val; 256 int val;
260 char tmp[64];
261 257
262 cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0x00); 258 cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0x00);
263 cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0x00); 259 cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0x00);
264 260
265 val = cs->BC_Read_Reg(cs, 1, jade_HDLC_ISR); 261 val = cs->BC_Read_Reg(cs, 1, jade_HDLC_ISR);
266 sprintf(tmp, "jade B ISTA %x", val); 262 debugl1(cs, "jade B ISTA %x", val);
267 debugl1(cs, tmp);
268 val = cs->BC_Read_Reg(cs, 0, jade_HDLC_ISR); 263 val = cs->BC_Read_Reg(cs, 0, jade_HDLC_ISR);
269 sprintf(tmp, "jade A ISTA %x", val); 264 debugl1(cs, "jade A ISTA %x", val);
270 debugl1(cs, tmp);
271 val = cs->BC_Read_Reg(cs, 1, jade_HDLC_STAR); 265 val = cs->BC_Read_Reg(cs, 1, jade_HDLC_STAR);
272 sprintf(tmp, "jade B STAR %x", val); 266 debugl1(cs, "jade B STAR %x", val);
273 debugl1(cs, tmp);
274 val = cs->BC_Read_Reg(cs, 0, jade_HDLC_STAR); 267 val = cs->BC_Read_Reg(cs, 0, jade_HDLC_STAR);
275 sprintf(tmp, "jade A STAR %x", val); 268 debugl1(cs, "jade A STAR %x", val);
276 debugl1(cs, tmp);
277 /* Unmask ints */ 269 /* Unmask ints */
278 cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0xF8); 270 cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0xF8);
279 cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0xF8); 271 cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0xF8);
diff --git a/drivers/isdn/hisax/jade_irq.c b/drivers/isdn/hisax/jade_irq.c
index f521fc83dc76..b930da9b5aa6 100644
--- a/drivers/isdn/hisax/jade_irq.c
+++ b/drivers/isdn/hisax/jade_irq.c
@@ -65,7 +65,7 @@ jade_empty_fifo(struct BCState *bcs, int count)
65 t += sprintf(t, "jade_empty_fifo %c cnt %d", 65 t += sprintf(t, "jade_empty_fifo %c cnt %d",
66 bcs->hw.hscx.hscx ? 'B' : 'A', count); 66 bcs->hw.hscx.hscx ? 'B' : 'A', count);
67 QuickHex(t, ptr, count); 67 QuickHex(t, ptr, count);
68 debugl1(cs, bcs->blog); 68 debugl1(cs, "%s", bcs->blog);
69 } 69 }
70} 70}
71 71
@@ -105,7 +105,7 @@ jade_fill_fifo(struct BCState *bcs)
105 t += sprintf(t, "jade_fill_fifo %c cnt %d", 105 t += sprintf(t, "jade_fill_fifo %c cnt %d",
106 bcs->hw.hscx.hscx ? 'B' : 'A', count); 106 bcs->hw.hscx.hscx ? 'B' : 'A', count);
107 QuickHex(t, ptr, count); 107 QuickHex(t, ptr, count);
108 debugl1(cs, bcs->blog); 108 debugl1(cs, "%s", bcs->blog);
109 } 109 }
110} 110}
111 111
diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c
index 4c1bca5caa1d..875402e76d0a 100644
--- a/drivers/isdn/hisax/l3_1tr6.c
+++ b/drivers/isdn/hisax/l3_1tr6.c
@@ -63,7 +63,7 @@ l3_1tr6_error(struct l3_process *pc, u_char *msg, struct sk_buff *skb)
63{ 63{
64 dev_kfree_skb(skb); 64 dev_kfree_skb(skb);
65 if (pc->st->l3.debug & L3_DEB_WARN) 65 if (pc->st->l3.debug & L3_DEB_WARN)
66 l3_debug(pc->st, msg); 66 l3_debug(pc->st, "%s", msg);
67 l3_1tr6_release_req(pc, 0, NULL); 67 l3_1tr6_release_req(pc, 0, NULL);
68} 68}
69 69
@@ -161,7 +161,6 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg)
161{ 161{
162 u_char *p; 162 u_char *p;
163 int bcfound = 0; 163 int bcfound = 0;
164 char tmp[80];
165 struct sk_buff *skb = arg; 164 struct sk_buff *skb = arg;
166 165
167 /* Channel Identification */ 166 /* Channel Identification */
@@ -214,10 +213,9 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg)
214 /* Signal all services, linklevel takes care of Service-Indicator */ 213 /* Signal all services, linklevel takes care of Service-Indicator */
215 if (bcfound) { 214 if (bcfound) {
216 if ((pc->para.setup.si1 != 7) && (pc->st->l3.debug & L3_DEB_WARN)) { 215 if ((pc->para.setup.si1 != 7) && (pc->st->l3.debug & L3_DEB_WARN)) {
217 sprintf(tmp, "non-digital call: %s -> %s", 216 l3_debug(pc->st, "non-digital call: %s -> %s",
218 pc->para.setup.phone, 217 pc->para.setup.phone,
219 pc->para.setup.eazmsn); 218 pc->para.setup.eazmsn);
220 l3_debug(pc->st, tmp);
221 } 219 }
222 newl3state(pc, 6); 220 newl3state(pc, 6);
223 pc->st->l3.l3l4(pc->st, CC_SETUP | INDICATION, pc); 221 pc->st->l3.l3l4(pc->st, CC_SETUP | INDICATION, pc);
@@ -301,7 +299,7 @@ l3_1tr6_info(struct l3_process *pc, u_char pr, void *arg)
301{ 299{
302 u_char *p; 300 u_char *p;
303 int i, tmpcharge = 0; 301 int i, tmpcharge = 0;
304 char a_charge[8], tmp[32]; 302 char a_charge[8];
305 struct sk_buff *skb = arg; 303 struct sk_buff *skb = arg;
306 304
307 p = skb->data; 305 p = skb->data;
@@ -316,8 +314,8 @@ l3_1tr6_info(struct l3_process *pc, u_char pr, void *arg)
316 pc->st->l3.l3l4(pc->st, CC_CHARGE | INDICATION, pc); 314 pc->st->l3.l3l4(pc->st, CC_CHARGE | INDICATION, pc);
317 } 315 }
318 if (pc->st->l3.debug & L3_DEB_CHARGE) { 316 if (pc->st->l3.debug & L3_DEB_CHARGE) {
319 sprintf(tmp, "charging info %d", pc->para.chargeinfo); 317 l3_debug(pc->st, "charging info %d",
320 l3_debug(pc->st, tmp); 318 pc->para.chargeinfo);
321 } 319 }
322 } else if (pc->st->l3.debug & L3_DEB_CHARGE) 320 } else if (pc->st->l3.debug & L3_DEB_CHARGE)
323 l3_debug(pc->st, "charging info not found"); 321 l3_debug(pc->st, "charging info not found");
@@ -399,7 +397,7 @@ l3_1tr6_disc(struct l3_process *pc, u_char pr, void *arg)
399 struct sk_buff *skb = arg; 397 struct sk_buff *skb = arg;
400 u_char *p; 398 u_char *p;
401 int i, tmpcharge = 0; 399 int i, tmpcharge = 0;
402 char a_charge[8], tmp[32]; 400 char a_charge[8];
403 401
404 StopAllL3Timer(pc); 402 StopAllL3Timer(pc);
405 p = skb->data; 403 p = skb->data;
@@ -414,8 +412,8 @@ l3_1tr6_disc(struct l3_process *pc, u_char pr, void *arg)
414 pc->st->l3.l3l4(pc->st, CC_CHARGE | INDICATION, pc); 412 pc->st->l3.l3l4(pc->st, CC_CHARGE | INDICATION, pc);
415 } 413 }
416 if (pc->st->l3.debug & L3_DEB_CHARGE) { 414 if (pc->st->l3.debug & L3_DEB_CHARGE) {
417 sprintf(tmp, "charging info %d", pc->para.chargeinfo); 415 l3_debug(pc->st, "charging info %d",
418 l3_debug(pc->st, tmp); 416 pc->para.chargeinfo);
419 } 417 }
420 } else if (pc->st->l3.debug & L3_DEB_CHARGE) 418 } else if (pc->st->l3.debug & L3_DEB_CHARGE)
421 l3_debug(pc->st, "charging info not found"); 419 l3_debug(pc->st, "charging info not found");
@@ -746,7 +744,6 @@ up1tr6(struct PStack *st, int pr, void *arg)
746 int i, mt, cr; 744 int i, mt, cr;
747 struct l3_process *proc; 745 struct l3_process *proc;
748 struct sk_buff *skb = arg; 746 struct sk_buff *skb = arg;
749 char tmp[80];
750 747
751 switch (pr) { 748 switch (pr) {
752 case (DL_DATA | INDICATION): 749 case (DL_DATA | INDICATION):
@@ -762,26 +759,23 @@ up1tr6(struct PStack *st, int pr, void *arg)
762 } 759 }
763 if (skb->len < 4) { 760 if (skb->len < 4) {
764 if (st->l3.debug & L3_DEB_PROTERR) { 761 if (st->l3.debug & L3_DEB_PROTERR) {
765 sprintf(tmp, "up1tr6 len only %d", skb->len); 762 l3_debug(st, "up1tr6 len only %d", skb->len);
766 l3_debug(st, tmp);
767 } 763 }
768 dev_kfree_skb(skb); 764 dev_kfree_skb(skb);
769 return; 765 return;
770 } 766 }
771 if ((skb->data[0] & 0xfe) != PROTO_DIS_N0) { 767 if ((skb->data[0] & 0xfe) != PROTO_DIS_N0) {
772 if (st->l3.debug & L3_DEB_PROTERR) { 768 if (st->l3.debug & L3_DEB_PROTERR) {
773 sprintf(tmp, "up1tr6%sunexpected discriminator %x message len %d", 769 l3_debug(st, "up1tr6%sunexpected discriminator %x message len %d",
774 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ", 770 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ",
775 skb->data[0], skb->len); 771 skb->data[0], skb->len);
776 l3_debug(st, tmp);
777 } 772 }
778 dev_kfree_skb(skb); 773 dev_kfree_skb(skb);
779 return; 774 return;
780 } 775 }
781 if (skb->data[1] != 1) { 776 if (skb->data[1] != 1) {
782 if (st->l3.debug & L3_DEB_PROTERR) { 777 if (st->l3.debug & L3_DEB_PROTERR) {
783 sprintf(tmp, "up1tr6 CR len not 1"); 778 l3_debug(st, "up1tr6 CR len not 1");
784 l3_debug(st, tmp);
785 } 779 }
786 dev_kfree_skb(skb); 780 dev_kfree_skb(skb);
787 return; 781 return;
@@ -791,9 +785,8 @@ up1tr6(struct PStack *st, int pr, void *arg)
791 if (skb->data[0] == PROTO_DIS_N0) { 785 if (skb->data[0] == PROTO_DIS_N0) {
792 dev_kfree_skb(skb); 786 dev_kfree_skb(skb);
793 if (st->l3.debug & L3_DEB_STATE) { 787 if (st->l3.debug & L3_DEB_STATE) {
794 sprintf(tmp, "up1tr6%s N0 mt %x unhandled", 788 l3_debug(st, "up1tr6%s N0 mt %x unhandled",
795 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ", mt); 789 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ", mt);
796 l3_debug(st, tmp);
797 } 790 }
798 } else if (skb->data[0] == PROTO_DIS_N1) { 791 } else if (skb->data[0] == PROTO_DIS_N1) {
799 if (!(proc = getl3proc(st, cr))) { 792 if (!(proc = getl3proc(st, cr))) {
@@ -801,8 +794,7 @@ up1tr6(struct PStack *st, int pr, void *arg)
801 if (cr < 128) { 794 if (cr < 128) {
802 if (!(proc = new_l3_process(st, cr))) { 795 if (!(proc = new_l3_process(st, cr))) {
803 if (st->l3.debug & L3_DEB_PROTERR) { 796 if (st->l3.debug & L3_DEB_PROTERR) {
804 sprintf(tmp, "up1tr6 no roc mem"); 797 l3_debug(st, "up1tr6 no roc mem");
805 l3_debug(st, tmp);
806 } 798 }
807 dev_kfree_skb(skb); 799 dev_kfree_skb(skb);
808 return; 800 return;
@@ -821,8 +813,7 @@ up1tr6(struct PStack *st, int pr, void *arg)
821 } else { 813 } else {
822 if (!(proc = new_l3_process(st, cr))) { 814 if (!(proc = new_l3_process(st, cr))) {
823 if (st->l3.debug & L3_DEB_PROTERR) { 815 if (st->l3.debug & L3_DEB_PROTERR) {
824 sprintf(tmp, "up1tr6 no roc mem"); 816 l3_debug(st, "up1tr6 no roc mem");
825 l3_debug(st, tmp);
826 } 817 }
827 dev_kfree_skb(skb); 818 dev_kfree_skb(skb);
828 return; 819 return;
@@ -837,18 +828,16 @@ up1tr6(struct PStack *st, int pr, void *arg)
837 if (i == ARRAY_SIZE(datastln1)) { 828 if (i == ARRAY_SIZE(datastln1)) {
838 dev_kfree_skb(skb); 829 dev_kfree_skb(skb);
839 if (st->l3.debug & L3_DEB_STATE) { 830 if (st->l3.debug & L3_DEB_STATE) {
840 sprintf(tmp, "up1tr6%sstate %d mt %x unhandled", 831 l3_debug(st, "up1tr6%sstate %d mt %x unhandled",
841 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ", 832 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ",
842 proc->state, mt); 833 proc->state, mt);
843 l3_debug(st, tmp);
844 } 834 }
845 return; 835 return;
846 } else { 836 } else {
847 if (st->l3.debug & L3_DEB_STATE) { 837 if (st->l3.debug & L3_DEB_STATE) {
848 sprintf(tmp, "up1tr6%sstate %d mt %x", 838 l3_debug(st, "up1tr6%sstate %d mt %x",
849 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ", 839 (pr == (DL_DATA | INDICATION)) ? " " : "(broadcast) ",
850 proc->state, mt); 840 proc->state, mt);
851 l3_debug(st, tmp);
852 } 841 }
853 datastln1[i].rout(proc, pr, skb); 842 datastln1[i].rout(proc, pr, skb);
854 } 843 }
@@ -861,7 +850,6 @@ down1tr6(struct PStack *st, int pr, void *arg)
861 int i, cr; 850 int i, cr;
862 struct l3_process *proc; 851 struct l3_process *proc;
863 struct Channel *chan; 852 struct Channel *chan;
864 char tmp[80];
865 853
866 if ((DL_ESTABLISH | REQUEST) == pr) { 854 if ((DL_ESTABLISH | REQUEST) == pr) {
867 l3_msg(st, pr, NULL); 855 l3_msg(st, pr, NULL);
@@ -888,15 +876,13 @@ down1tr6(struct PStack *st, int pr, void *arg)
888 break; 876 break;
889 if (i == ARRAY_SIZE(downstl)) { 877 if (i == ARRAY_SIZE(downstl)) {
890 if (st->l3.debug & L3_DEB_STATE) { 878 if (st->l3.debug & L3_DEB_STATE) {
891 sprintf(tmp, "down1tr6 state %d prim %d unhandled", 879 l3_debug(st, "down1tr6 state %d prim %d unhandled",
892 proc->state, pr); 880 proc->state, pr);
893 l3_debug(st, tmp);
894 } 881 }
895 } else { 882 } else {
896 if (st->l3.debug & L3_DEB_STATE) { 883 if (st->l3.debug & L3_DEB_STATE) {
897 sprintf(tmp, "down1tr6 state %d prim %d", 884 l3_debug(st, "down1tr6 state %d prim %d",
898 proc->state, pr); 885 proc->state, pr);
899 l3_debug(st, tmp);
900 } 886 }
901 downstl[i].rout(proc, pr, arg); 887 downstl[i].rout(proc, pr, arg);
902 } 888 }
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
index b646eed379df..233e432e06f6 100644
--- a/drivers/isdn/hisax/netjet.c
+++ b/drivers/isdn/hisax/netjet.c
@@ -176,7 +176,7 @@ static void printframe(struct IsdnCardState *cs, u_char *buf, int count, char *s
176 else 176 else
177 j = i; 177 j = i;
178 QuickHex(t, p, j); 178 QuickHex(t, p, j);
179 debugl1(cs, tmp); 179 debugl1(cs, "%s", tmp);
180 p += j; 180 p += j;
181 i -= j; 181 i -= j;
182 t = tmp; 182 t = tmp;
diff --git a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c
index 041bf52d9d0a..af1b020a81f1 100644
--- a/drivers/isdn/hisax/q931.c
+++ b/drivers/isdn/hisax/q931.c
@@ -1179,7 +1179,7 @@ LogFrame(struct IsdnCardState *cs, u_char *buf, int size)
1179 dp--; 1179 dp--;
1180 *dp++ = '\n'; 1180 *dp++ = '\n';
1181 *dp = 0; 1181 *dp = 0;
1182 HiSax_putstatus(cs, NULL, cs->dlog); 1182 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1183 } else 1183 } else
1184 HiSax_putstatus(cs, "LogFrame: ", "warning Frame too big (%d)", size); 1184 HiSax_putstatus(cs, "LogFrame: ", "warning Frame too big (%d)", size);
1185} 1185}
@@ -1246,7 +1246,7 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
1246 } 1246 }
1247 if (finish) { 1247 if (finish) {
1248 *dp = 0; 1248 *dp = 0;
1249 HiSax_putstatus(cs, NULL, cs->dlog); 1249 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1250 return; 1250 return;
1251 } 1251 }
1252 if ((0xfe & buf[0]) == PROTO_DIS_N0) { /* 1TR6 */ 1252 if ((0xfe & buf[0]) == PROTO_DIS_N0) { /* 1TR6 */
@@ -1509,5 +1509,5 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
1509 dp += sprintf(dp, "Unknown protocol %x!", buf[0]); 1509 dp += sprintf(dp, "Unknown protocol %x!", buf[0]);
1510 } 1510 }
1511 *dp = 0; 1511 *dp = 0;
1512 HiSax_putstatus(cs, NULL, cs->dlog); 1512 HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1513} 1513}
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
index d8cac6935818..a85895585d90 100644
--- a/drivers/isdn/hisax/w6692.c
+++ b/drivers/isdn/hisax/w6692.c
@@ -154,7 +154,7 @@ W6692_empty_fifo(struct IsdnCardState *cs, int count)
154 154
155 t += sprintf(t, "W6692_empty_fifo cnt %d", count); 155 t += sprintf(t, "W6692_empty_fifo cnt %d", count);
156 QuickHex(t, ptr, count); 156 QuickHex(t, ptr, count);
157 debugl1(cs, cs->dlog); 157 debugl1(cs, "%s", cs->dlog);
158 } 158 }
159} 159}
160 160
@@ -196,7 +196,7 @@ W6692_fill_fifo(struct IsdnCardState *cs)
196 196
197 t += sprintf(t, "W6692_fill_fifo cnt %d", count); 197 t += sprintf(t, "W6692_fill_fifo cnt %d", count);
198 QuickHex(t, ptr, count); 198 QuickHex(t, ptr, count);
199 debugl1(cs, cs->dlog); 199 debugl1(cs, "%s", cs->dlog);
200 } 200 }
201} 201}
202 202
@@ -226,7 +226,7 @@ W6692B_empty_fifo(struct BCState *bcs, int count)
226 t += sprintf(t, "W6692B_empty_fifo %c cnt %d", 226 t += sprintf(t, "W6692B_empty_fifo %c cnt %d",
227 bcs->channel + '1', count); 227 bcs->channel + '1', count);
228 QuickHex(t, ptr, count); 228 QuickHex(t, ptr, count);
229 debugl1(cs, bcs->blog); 229 debugl1(cs, "%s", bcs->blog);
230 } 230 }
231} 231}
232 232
@@ -264,7 +264,7 @@ W6692B_fill_fifo(struct BCState *bcs)
264 t += sprintf(t, "W6692B_fill_fifo %c cnt %d", 264 t += sprintf(t, "W6692B_fill_fifo %c cnt %d",
265 bcs->channel + '1', count); 265 bcs->channel + '1', count);
266 QuickHex(t, ptr, count); 266 QuickHex(t, ptr, count);
267 debugl1(cs, bcs->blog); 267 debugl1(cs, "%s", bcs->blog);
268 } 268 }
269} 269}
270 270