Date: Tue, 1 Feb 2011 10:25:48 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218165 - head/sys/dev/usb Message-ID: <201102011025.p11APmnB068418@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102011025.p11APmnB068418>