Skip to content

Commit 92ba0ee

Browse files
tilmanschmidtLinus Torvalds
authored andcommitted
[PATCH] drivers/isdn/gigaset: reduce kernel message spam
Reduce the number of kernel messages the Gigaset drivers produce in case of an excessively long device response, from one per character exceeding the limit to one per overlong message. Signed-off-by: Tilman Schmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 7435f50 commit 92ba0ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/isdn/gigaset/isocdata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,8 @@ static void cmd_loop(unsigned char *src, int numbytes, struct inbuf_t *inbuf)
921921
/* end of line */
922922
gig_dbg(DEBUG_TRANSCMD, "%s: End of Command (%d Bytes)",
923923
__func__, cbytes);
924+
if (cbytes >= MAX_RESP_SIZE - 1)
925+
dev_warn(cs->dev, "response too large\n");
924926
cs->cbytes = cbytes;
925927
gigaset_handle_modem_response(cs);
926928
cbytes = 0;
@@ -929,8 +931,6 @@ static void cmd_loop(unsigned char *src, int numbytes, struct inbuf_t *inbuf)
929931
/* advance in line buffer, checking for overflow */
930932
if (cbytes < MAX_RESP_SIZE - 1)
931933
cbytes++;
932-
else
933-
dev_warn(cs->dev, "response too large\n");
934934
}
935935
}
936936

0 commit comments

Comments
 (0)