All of lore.kernel.org
 help / color / mirror / Atom feed
* Improve error handling for msp3400.c
@ 2003-07-12 21:47 Jan Dittmer
  0 siblings, 0 replies; only message in thread
From: Jan Dittmer @ 2003-07-12 21:47 UTC (permalink / raw)
  To: kraxel; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Hi,

on read/send failure the msp3400 driver is trying three times to recover and 
is printing a message each time. On a unloaded system this happens at a rate 
of about 1/min while watching tv and is quite annoying, while non critical.
This patchs gets rid of it and instead raises the final error message to 
KERN_ERR if indeed the communication failed three times in a row.

Thanks,

Jan

-- 
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686

[-- Attachment #2: msp3400.remove.warning --]
[-- Type: text/plain, Size: 1183 bytes --]

--- linux-bk/drivers/media/video/msp3400.c	Fri May 30 20:29:35 2003
+++ 2.5.75-bk1-jd2/drivers/media/video/msp3400.c	Sat Jul 12 23:41:19 2003
@@ -192,13 +192,11 @@
 		if (2 == i2c_transfer(client->adapter,msgs,2))
 			break;
 		err++;
-		printk(KERN_WARNING "msp34xx: I/O error #%d (read 0x%02x/0x%02x)\n",
-		       err, dev, addr);
 		current->state = TASK_INTERRUPTIBLE;
 		schedule_timeout(HZ/10);
 	}
 	if (3 == err) {
-		printk(KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
+		printk(KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
 		msp3400c_reset(client);
 		return -1;
 	}
@@ -221,13 +219,11 @@
 		if (5 == i2c_master_send(client, buffer, 5))
 			break;
 		err++;
-		printk(KERN_WARNING "msp34xx: I/O error #%d (write 0x%02x/0x%02x)\n",
-		       err, dev, addr);
 		current->state = TASK_INTERRUPTIBLE;
 		schedule_timeout(HZ/10);
 	}
 	if (3 == err) {
-		printk(KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
+		printk(KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
 		msp3400c_reset(client);
 		return -1;
 	}

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

only message in thread, other threads:[~2003-07-12 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-12 21:47 Improve error handling for msp3400.c Jan Dittmer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.