PERFORCE change 110365 for review

Warner Losh imp at FreeBSD.org
Wed Nov 22 06:02:29 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=110365

Change 110365 by imp at imp_lighthouse on 2006/11/22 06:02:23

	Remove debug in diff reduction against -current.

Affected files ...

.. //depot/projects/arm/src/sys/dev/iicbus/iic.c#9 edit

Differences ...

==== //depot/projects/arm/src/sys/dev/iicbus/iic.c#9 (text+ko) ====

@@ -246,15 +246,13 @@
 	char *buf = NULL;
 	void **usrbufs = NULL;
 
-	if (!sc) { printf("iic einval\n");
-		return (EINVAL); }
+	if (!sc)
+		return (EINVAL);
 
 	if ((error = iicbus_request_bus(device_get_parent(iicdev), iicdev,
 			(flags & O_NONBLOCK) ? IIC_DONTWAIT :
-						(IIC_WAIT | IIC_INTR)))) {
-		printf("bus request failed %d\n", error);
+						(IIC_WAIT | IIC_INTR))))
 		return (error);
-	}
 
 	switch (cmd) {
 	case I2CSTART:
@@ -284,10 +282,6 @@
 			break;
 		}
 		buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK);
-		if (buf == NULL) {
-			error = ENOMEM;
-			break;
-		}
 		error = copyin(s->buf, buf, s->count);
 		if (error)
 			break;
@@ -300,10 +294,6 @@
 			break;
 		}
 		buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK);
-		if (buf == NULL) {
-			error = ENOMEM;
-			break;
-		}
 		error = iicbus_read(parent, buf, s->count, &count, s->last, 10);
 		if (error)
 			break;
@@ -314,10 +304,8 @@
 		buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK);
 		usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK);
 		error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs);
-		if (error) {
-			printf("copyin msgs returns %d\n", error);
+		if (error)
 			break;
-		}
 		/* Alloc kernel buffers for userland data, copyin write data */
 		for (i = 0; i < d->nmsgs; i++) {
 			m = &((struct iic_msg *)buf)[i];


More information about the p4-projects mailing list