LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drivers/isdn/gigaset: reduce kernel message spam
@ 2007-02-07 21:40 Tilman Schmidt
  0 siblings, 0 replies; only message in thread
From: Tilman Schmidt @ 2007-02-07 21:40 UTC (permalink / raw)
  To: Andrew Morton, Karsten Keil, Linux Kernel Mailing List, i4ldeveloper
  Cc: Hansjoerg Lipp

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 <tilman@imap.cc>
---

 isocdata.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.20-rc6-mm3-orig/drivers/isdn/gigaset/isocdata.c	2007-02-01 01:23:54.000000000 +0100
+++ linux-2.6.20-rc6-mm3-work/drivers/isdn/gigaset/isocdata.c	2007-02-05 17:35:47.000000000 +0100
@@ -921,6 +921,8 @@ static void cmd_loop(unsigned char *src,
 			/* end of line */
 			gig_dbg(DEBUG_TRANSCMD, "%s: End of Command (%d Bytes)",
 				__func__, cbytes);
+			if (cbytes >= MAX_RESP_SIZE - 1)
+				dev_warn(cs->dev, "response too large\n");
 			cs->cbytes = cbytes;
 			gigaset_handle_modem_response(cs);
 			cbytes = 0;
@@ -929,8 +931,6 @@ static void cmd_loop(unsigned char *src,
 			/* advance in line buffer, checking for overflow */
 			if (cbytes < MAX_RESP_SIZE - 1)
 				cbytes++;
-			else
-				dev_warn(cs->dev, "response too large\n");
 		}
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-07 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-07 21:40 [PATCH] drivers/isdn/gigaset: reduce kernel message spam Tilman Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).