From owner-cvs-src@FreeBSD.ORG Thu Oct 23 01:03:23 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 AF20F16A4B3; Thu, 23 Oct 2003 01:03:23 -0700 (PDT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 948D543FB1; Thu, 23 Oct 2003 01:03:22 -0700 (PDT) (envelope-from des@des.no) Received: from smtp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id B4A4479061; Thu, 23 Oct 2003 10:03:21 +0200 (MEST) Received: by smtp.des.no (Pony Express, from userid 666) id 4DFB19B992; Thu, 23 Oct 2003 10:03:21 +0200 (CEST) Received: from dwp.des.no (dwp.des.no [10.0.0.4]) by smtp.des.no (Pony Express) with ESMTP id 243649B52E; Thu, 23 Oct 2003 10:03:17 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 0DA89B823; Thu, 23 Oct 2003 10:03:16 +0200 (CEST) To: "M. Warner Losh" References: <20031022213712.S60963@root.org> <20031022.235525.122825408.imp@bsdimp.com> <20031023.013423.02875687.imp@bsdimp.com> From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Thu, 23 Oct 2003 10:03:16 +0200 In-Reply-To: <20031023.013423.02875687.imp@bsdimp.com> (M. Warner Losh's message of "Thu, 23 Oct 2003 01:34:23 -0600 (MDT)") Message-ID: User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on dsa.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: nate@root.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 08:03:23 -0000 "M. Warner Losh" writes: > des@des.no (Dag-Erling Sm=F8rgrav) writes: > > caddr_t is never right. If it's a character pointer, use char *. > Why not? The rest of the driver uses it heavily, and the data type of > the underlying mbufs is caddr_t: Because the intention behind caddr_t was to be a "poor man's void *". When used as "void *" it is patently wrong, and when used as "char *" it is simply needless, unportable, obfuscating baggage. If you mean "char *", you should write "char *". In fact, the use of caddr_t to mean char * in network code was *the* major obstacle that made me stop trying to remove it wholesale from the kernel, because it was hard to determine mechanically whether it meant "void *" or "char *", and I ended up having to do it by hand. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no