From owner-p4-projects@FreeBSD.ORG Wed Nov 22 06:02:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6A65516A415; Wed, 22 Nov 2006 06:02:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 458CD16A40F for ; Wed, 22 Nov 2006 06:02:29 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A78043D45 for ; Wed, 22 Nov 2006 06:02:02 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAM62Scj056162 for ; Wed, 22 Nov 2006 06:02:28 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAM62SPn056159 for perforce@freebsd.org; Wed, 22 Nov 2006 06:02:28 GMT (envelope-from imp@freebsd.org) Date: Wed, 22 Nov 2006 06:02:28 GMT Message-Id: <200611220602.kAM62SPn056159@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 06:02:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=110365 Change 110365 by imp@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];