From owner-cvs-src@FreeBSD.ORG Wed Oct 22 22:58:31 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0936216A4B3; Wed, 22 Oct 2003 22:58:31 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A64EF43FA3; Wed, 22 Oct 2003 22:58:27 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p2/8.12.9) with ESMTP id h9N5wQE7046892; Wed, 22 Oct 2003 23:58:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 22 Oct 2003 23:55:25 -0600 (MDT) Message-Id: <20031022.235525.122825408.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <20031022213712.S60963@root.org> References: <20031023034322.2C93616A551@hub.freebsd.org> <20031022213712.S60963@root.org> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/ep if_ep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 05:58:31 -0000 In message: <20031022213712.S60963@root.org> Nate Lawson writes: : On Wed, 22 Oct 2003, Warner Losh wrote: : > FreeBSD src repository : > : > Modified files: : > sys/dev/ep if_ep.c : > Log: : > Learn basic C. : > ((uint32_t *) v) + 10 != ((caddr_t) v) + 10 : > so apply the cast later. : > : > Revision Changes Path : > 1.123 +3 -2 src/sys/dev/ep/if_ep.c : > : > Index: src/sys/dev/ep/if_ep.c : > diff -u src/sys/dev/ep/if_ep.c:1.122 src/sys/dev/ep/if_ep.c:1.123 : > --- src/sys/dev/ep/if_ep.c:1.122 Sat Oct 18 08:22:43 2003 : > +++ src/sys/dev/ep/if_ep.c Wed Oct 22 20:42:47 2003 : > @@ -758,7 +758,7 @@ : > if (EP_FTST(sc, F_ACCESS_32_BITS)) { : > /* default for EISA configured cards */ : > EP_READ_MULTI_4(sc, EP_W1_RX_PIO_RD_1, : > - mtod(m, uint32_t *)+m->m_len, : > + (uint32_t *)(mtod(m, caddr_t)+m->m_len), : > lenthisone / 4); : > m->m_len += (lenthisone & ~3); : > if (lenthisone & 3) : : Are you sure you want caddr_t? Isn't the New Way uintptr_t? caddr_t is right: it is a character pointer. uintptr_t is something else. caddr_t is what was used before. Warner