From patchwork Fri Jan 7 20:29:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 77905 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 087E4B7127 for ; Sat, 8 Jan 2011 07:31:05 +1100 (EST) Received: from localhost ([127.0.0.1]:49068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbIxi-0007UM-0U for incoming@patchwork.ozlabs.org; Fri, 07 Jan 2011 15:31:02 -0500 Received: from [140.186.70.92] (port=60348 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbIwG-0006Qh-OG for qemu-devel@nongnu.org; Fri, 07 Jan 2011 15:29:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbIwF-0003LJ-Bs for qemu-devel@nongnu.org; Fri, 07 Jan 2011 15:29:32 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:50637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbIwE-0003Kk-Rw for qemu-devel@nongnu.org; Fri, 07 Jan 2011 15:29:31 -0500 Received: from flocke.fritz.box (p5086F727.dip.t-dialin.net [80.134.247.39]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MMJjd-1PgW0Q28w1-007xQI; Fri, 07 Jan 2011 21:29:28 +0100 Received: from stefan by flocke.fritz.box with local (Exim 4.72) (envelope-from ) id 1PbIw0-0007QQ-Ny; Fri, 07 Jan 2011 21:29:16 +0100 From: Stefan Weil To: QEMU Developers Date: Fri, 7 Jan 2011 21:29:15 +0100 Message-Id: <1294432155-28513-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.3 X-Provags-ID: V02:K0:qXSMn4qXKOKXd5ytan/UD4idBUyqza0bHcriCRFyKA+ vNVNydZOss1wKlbUeI/eX3/G8vp0MoC/ljJp/c6TptPhVysy/z ZJrJamaIIW6rvylXryp4Rbb7b8f2o+iOPYiWxvmhnUjIz0yQuM M+CqGCcYBPbLDPkIz67fgYH4nzX3kPoNe6bfd14VapinROAZQE rnqI8Ym8BgvgxXoaNzfc/jKuw+GxCVIZ89O/Y7wxmGdJbaqudm TEwAqi+xE3wBh X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] Fix trivial "endianness bugs" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Replace endianess -> endianness. Signed-off-by: Stefan Weil --- audio/sdlaudio.c | 20 ++++++++++---------- block/vdi.c | 4 ++-- hw/xilinx_ethlite.c | 2 +- target-mips/cpu.h | 2 +- usb-bsd.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index b74dcfa..04fb9f4 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -139,36 +139,36 @@ static int aud_to_sdlfmt (audfmt_e fmt) } } -static int sdl_to_audfmt (int sdlfmt, audfmt_e *fmt, int *endianess) +static int sdl_to_audfmt (int sdlfmt, audfmt_e *fmt, int *endianness) { switch (sdlfmt) { case AUDIO_S8: - *endianess = 0; + *endianness = 0; *fmt = AUD_FMT_S8; break; case AUDIO_U8: - *endianess = 0; + *endianness = 0; *fmt = AUD_FMT_U8; break; case AUDIO_S16LSB: - *endianess = 0; + *endianness = 0; *fmt = AUD_FMT_S16; break; case AUDIO_U16LSB: - *endianess = 0; + *endianness = 0; *fmt = AUD_FMT_U16; break; case AUDIO_S16MSB: - *endianess = 1; + *endianness = 1; *fmt = AUD_FMT_S16; break; case AUDIO_U16MSB: - *endianess = 1; + *endianness = 1; *fmt = AUD_FMT_U16; break; @@ -338,7 +338,7 @@ static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as) SDLVoiceOut *sdl = (SDLVoiceOut *) hw; SDLAudioState *s = &glob_sdl; SDL_AudioSpec req, obt; - int endianess; + int endianness; int err; audfmt_e effective_fmt; struct audsettings obt_as; @@ -354,7 +354,7 @@ static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as) return -1; } - err = sdl_to_audfmt (obt.format, &effective_fmt, &endianess); + err = sdl_to_audfmt (obt.format, &effective_fmt, &endianness); if (err) { sdl_close (s); return -1; @@ -363,7 +363,7 @@ static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as) obt_as.freq = obt.freq; obt_as.nchannels = obt.channels; obt_as.fmt = effective_fmt; - obt_as.endianness = endianess; + obt_as.endianness = endianness; audio_pcm_init_info (&hw->info, &obt_as); hw->samples = obt.samples; diff --git a/block/vdi.c b/block/vdi.c index ab8f70f..83b9c04 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -113,7 +113,7 @@ void uuid_unparse(const uuid_t uu, char *out); */ #define VDI_TEXT "<<< QEMU VM Virtual Disk Image >>>\n" -/* Unallocated blocks use this index (no need to convert endianess). */ +/* Unallocated blocks use this index (no need to convert endianness). */ #define VDI_UNALLOCATED UINT32_MAX #if !defined(CONFIG_UUID) @@ -194,7 +194,7 @@ typedef struct { uint32_t block_sectors; /* First sector of block map. */ uint32_t bmap_sector; - /* VDI header (converted to host endianess). */ + /* VDI header (converted to host endianness). */ VdiHeader header; } BDRVVdiState; diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c index 54b57d7..a6bd4e5 100644 --- a/hw/xilinx_ethlite.c +++ b/hw/xilinx_ethlite.c @@ -186,7 +186,7 @@ static ssize_t eth_rx(VLANClientState *nc, const uint8_t *buf, size_t size) D(qemu_log("%s %d rxbase=%x\n", __func__, size, rxbase)); memcpy(&s->regs[rxbase + R_RX_BUF0], buf, size); - /* Bring it into host endianess. */ + /* Bring it into host endianness. */ for (i = 0; i < ((size + 3) / 4); i++) { uint32_t d = s->regs[rxbase + R_RX_BUF0 + i]; s->regs[rxbase + R_RX_BUF0 + i] = be32_to_cpu(d); diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 2419aa9..0b98d10 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -63,7 +63,7 @@ union fpr_t { uint32_t w[2]; /* binary single fixed-point */ }; /* define FP_ENDIAN_IDX to access the same location - * in the fpr_t union regardless of the host endianess + * in the fpr_t union regardless of the host endianness */ #if defined(HOST_WORDS_BIGENDIAN) # define FP_ENDIAN_IDX 1 diff --git a/usb-bsd.c b/usb-bsd.c index 48567a3..3c84ae9 100644 --- a/usb-bsd.c +++ b/usb-bsd.c @@ -457,7 +457,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) printf("usb_host_scan: couldn't get device information for %s - %s\n", devbuf, strerror(errno)); - // XXX: might need to fixup endianess of word values before copying over + // XXX: might need to fixup endianness of word values before copying over vendor_id = dev_info.udi_vendorNo; product_id = dev_info.udi_productNo;