From owner-freebsd-alpha Thu Aug 27 01:48:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA07258 for freebsd-alpha-outgoing; Thu, 27 Aug 1998 01:48:22 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA07192 for ; Thu, 27 Aug 1998 01:48:13 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id JAA08544; Thu, 27 Aug 1998 09:46:43 +0100 (BST) Date: Thu, 27 Aug 1998 09:46:43 +0100 (BST) From: Doug Rabson To: Roger Hardiman cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Recent Alpha typecast to brooktre848.c In-Reply-To: <35E4B618.56FD@cs.strath.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 27 Aug 1998, Roger Hardiman wrote: > Hi, > I work on the bt848 driver and was looking at the > recent typecast change from "u_long" to "(uintptr_t) (void*)" > in the driver. > Logs state this was for the Alpha kernel. > > I think this may be incorrect. > < *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer; > --- > > *(*dma_prog)++ = (u_long) *target_buffer; > > The block of memory *dma_prog is pointing to is the > instruction list for the bt848 chip's internal RISC processor. > This is a set of 32 bit instructions. > uintptr_t is defined as an unsigned long in Alpha/types.h > so should this be a typecast to u_int32 and not uintptr_t > > Can someone working on this drop me an email. There are lots of > other (u_long) type casts in the driver when writing > to the dma_prog buffer which may need fixing. Probably the casts should be u_int32_t. I haven't tried to get the bt848 driver working on the alpha yet (I do have a card but I need to get an X server running first ...). This commit was one of Bruce's sweeps over the code tidying up casts from pointers to integers. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message