From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJ6C-0002UA-FF for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:06:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmJ61-0002Cs-Sc for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:06:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJ61-0002Cc-LK for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:06:41 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAT86fic002736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 29 Nov 2013 03:06:41 -0500 From: Gerd Hoffmann Date: Fri, 29 Nov 2013 09:06:21 +0100 Message-Id: <1385712381-30918-18-git-send-email-kraxel@redhat.com> In-Reply-To: <1385712381-30918-1-git-send-email-kraxel@redhat.com> References: <1385712381-30918-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb/desc.c | 10 ---------- hw/usb/desc.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c index 5dbe754..f18a043 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -6,16 +6,6 @@ /* ------------------------------------------------------------------ */ -static uint8_t usb_lo(uint16_t val) -{ - return val & 0xff; -} - -static uint8_t usb_hi(uint16_t val) -{ - return (val >> 8) & 0xff; -} - int usb_desc_device(const USBDescID *id, const USBDescDevice *dev, uint8_t *dest, size_t len) { diff --git a/hw/usb/desc.h b/hw/usb/desc.h index ddd3e74..81327b0 100644 --- a/hw/usb/desc.h +++ b/hw/usb/desc.h @@ -194,6 +194,17 @@ struct USBDesc { #define USB_DESC_FLAG_SUPER (1 << 1) +/* little helpers */ +static inline uint8_t usb_lo(uint16_t val) +{ + return val & 0xff; +} + +static inline uint8_t usb_hi(uint16_t val) +{ + return (val >> 8) & 0xff; +} + /* generate usb packages from structs */ int usb_desc_device(const USBDescID *id, const USBDescDevice *dev, uint8_t *dest, size_t len); -- 1.8.3.1