Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35a4a573 authored by Kees Cook's avatar Kees Cook Committed by David S. Miller
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2a69f0b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ Amd7930_empty_Dfifo(struct IsdnCardState *cs, int flag)

							t += sprintf(t, "Amd7930: empty_Dfifo cnt: %d |", cs->rcvidx);
							QuickHex(t, cs->rcvbuf, cs->rcvidx);
							debugl1(cs, cs->dlog);
							debugl1(cs, "%s", cs->dlog);
						}
						/* moves received data in sk-buffer */
						memcpy(skb_put(skb, cs->rcvidx), cs->rcvbuf, cs->rcvidx);
@@ -406,7 +406,7 @@ Amd7930_fill_Dfifo(struct IsdnCardState *cs)

		t += sprintf(t, "Amd7930: fill_Dfifo cnt: %d |", count);
		QuickHex(t, deb_ptr, count);
		debugl1(cs, cs->dlog);
		debugl1(cs, "%s", cs->dlog);
	}
	/* AMD interrupts on */
	AmdIrqOn(cs);
+2 −2
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ hdlc_empty_fifo(struct BCState *bcs, int count)
		t += sprintf(t, "hdlc_empty_fifo %c cnt %d",
			     bcs->channel ? 'B' : 'A', count);
		QuickHex(t, p, count);
		debugl1(cs, bcs->blog);
		debugl1(cs, "%s", bcs->blog);
	}
}

@@ -345,7 +345,7 @@ hdlc_fill_fifo(struct BCState *bcs)
		t += sprintf(t, "hdlc_fill_fifo %c cnt %d",
			     bcs->channel ? 'B' : 'A', count);
		QuickHex(t, p, count);
		debugl1(cs, bcs->blog);
		debugl1(cs, "%s", bcs->blog);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -1896,7 +1896,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
				ptr--;
				*ptr++ = '\n';
				*ptr = 0;
				HiSax_putstatus(cs, NULL, cs->dlog);
				HiSax_putstatus(cs, NULL, "%s", cs->dlog);
			} else
				HiSax_putstatus(cs, "LogEcho: ",
						"warning Frame too big (%d)",
+2 −2
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ Memhscx_empty_fifo(struct BCState *bcs, int count)
		t += sprintf(t, "hscx_empty_fifo %c cnt %d",
			     bcs->hw.hscx.hscx ? 'B' : 'A', count);
		QuickHex(t, ptr, count);
		debugl1(cs, bcs->blog);
		debugl1(cs, "%s", bcs->blog);
	}
}

@@ -469,7 +469,7 @@ Memhscx_fill_fifo(struct BCState *bcs)
		t += sprintf(t, "hscx_fill_fifo %c cnt %d",
			     bcs->hw.hscx.hscx ? 'B' : 'A', count);
		QuickHex(t, ptr, count);
		debugl1(cs, bcs->blog);
		debugl1(cs, "%s", bcs->blog);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ check_arcofi(struct IsdnCardState *cs)
		t = tmp;
		t += sprintf(tmp, "Arcofi data");
		QuickHex(t, p, cs->dc.isac.mon_rxp);
		debugl1(cs, tmp);
		debugl1(cs, "%s", tmp);
		if ((cs->dc.isac.mon_rxp == 2) && (cs->dc.isac.mon_rx[0] == 0xa0)) {
			switch (cs->dc.isac.mon_rx[1]) {
			case 0x80:
Loading