From owner-svn-src-all@FreeBSD.ORG Tue Feb 1 10:25:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22A41106566B; Tue, 1 Feb 2011 10:25:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06AFA8FC08; Tue, 1 Feb 2011 10:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p11APmjQ068421; Tue, 1 Feb 2011 10:25:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p11APmnB068418; Tue, 1 Feb 2011 10:25:48 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201102011025.p11APmnB068418@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 1 Feb 2011 10:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218165 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 10:25:49 -0000 Author: hselasky Date: Tue Feb 1 10:25:48 2011 New Revision: 218165 URL: http://svn.freebsd.org/changeset/base/218165 Log: Use correct kernel types for all fields in USB PF code and headers. Approved by: thompsa (mentor) Modified: head/sys/dev/usb/usb_pf.c head/sys/dev/usb/usb_pf.h Modified: head/sys/dev/usb/usb_pf.c ============================================================================== --- head/sys/dev/usb/usb_pf.c Tue Feb 1 10:20:31 2011 (r218164) +++ head/sys/dev/usb/usb_pf.c Tue Feb 1 10:25:48 2011 (r218165) @@ -228,10 +228,10 @@ usbpf_xfertap(struct usb_xfer *xfer, int ptr += sizeof(struct usbpf_pkthdr); for (i = 0; i < up->up_frames; i++) { - if (ptr + sizeof(u_int32_t) >= end) + if (ptr + sizeof(uint32_t) >= end) goto done; - *((u_int32_t *)ptr) = htole32(xfer->frlengths[i]); - ptr += sizeof(u_int32_t); + *((uint32_t *)ptr) = htole32(xfer->frlengths[i]); + ptr += sizeof(uint32_t); if (ptr + xfer->frlengths[i] >= end) goto done; Modified: head/sys/dev/usb/usb_pf.h ============================================================================== --- head/sys/dev/usb/usb_pf.h Tue Feb 1 10:20:31 2011 (r218164) +++ head/sys/dev/usb/usb_pf.h Tue Feb 1 10:25:48 2011 (r218165) @@ -38,12 +38,12 @@ #define _DEV_USB_PF_H struct usbpf_pkthdr { - int up_busunit; /* Host controller unit number */ - u_char up_address; /* USB device address */ - u_char up_endpoint; /* USB endpoint */ - u_char up_type; /* points SUBMIT / DONE */ - u_char up_xfertype; /* Transfer type */ - u_int32_t up_flags; /* Transfer flags */ + uint32_t up_busunit; /* Host controller unit number */ + uint8_t up_address; /* USB device address */ + uint8_t up_endpoint; /* USB endpoint */ + uint8_t up_type; /* points SUBMIT / DONE */ + uint8_t up_xfertype; /* Transfer type */ + uint32_t up_flags; /* Transfer flags */ #define USBPF_FLAG_FORCE_SHORT_XFER (1 << 0) #define USBPF_FLAG_SHORT_XFER_OK (1 << 1) #define USBPF_FLAG_SHORT_FRAMES_OK (1 << 2) @@ -53,7 +53,7 @@ struct usbpf_pkthdr { #define USBPF_FLAG_MANUAL_STATUS (1 << 6) #define USBPF_FLAG_NO_PIPE_OK (1 << 7) #define USBPF_FLAG_STALL_PIPE (1 << 8) - u_int32_t up_status; /* Transfer status */ + uint32_t up_status; /* Transfer status */ #define USBPF_STATUS_OPEN (1 << 0) #define USBPF_STATUS_TRANSFERRING (1 << 1) #define USBPF_STATUS_DID_DMA_DELAY (1 << 2) @@ -76,12 +76,12 @@ struct usbpf_pkthdr { #define USBPF_STATUS_CURR_DMA_SET (1 << 17) #define USBPF_STATUS_CAN_CANCEL_IMMED (1 << 18) #define USBPF_STATUS_DOING_CALLBACK (1 << 19) - u_int32_t up_length; /* Total data length (submit/actual) */ - u_int32_t up_frames; /* USB frame number (submit/actual) */ - u_int32_t up_error; /* usb_error_t */ - u_int32_t up_interval; /* for interrupt and isoc */ + uint32_t up_length; /* Total data length (submit/actual) */ + uint32_t up_frames; /* USB frame number (submit/actual) */ + uint32_t up_error; /* usb_error_t */ + uint32_t up_interval; /* for interrupt and isoc */ /* sizeof(struct usbpf_pkthdr) == 128 bytes */ - u_char up_reserved[96]; + uint8_t up_reserved[96]; }; #define USBPF_HDR_LEN 128