From patchwork Sat Jan 5 00:39:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 209594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 64AFA2C0084 for ; Sat, 5 Jan 2013 12:33:35 +1100 (EST) Received: from localhost ([::1]:52941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrHoL-0001FR-QM for incoming@patchwork.ozlabs.org; Fri, 04 Jan 2013 19:40:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrHnZ-00085T-LS for qemu-devel@nongnu.org; Fri, 04 Jan 2013 19:39:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrHnX-0008KZ-9P for qemu-devel@nongnu.org; Fri, 04 Jan 2013 19:39:41 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:56197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrHnX-0008KS-52 for qemu-devel@nongnu.org; Fri, 04 Jan 2013 19:39:39 -0500 Received: by mail-ie0-f181.google.com with SMTP id 16so20534041iea.12 for ; Fri, 04 Jan 2013 16:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=nciP7NWrPK4VLg66WCBMTS8WRhR36z5jXPT0isblApU=; b=MbNc3NMtyTol3xCgfZEq/kYyKQtsCTSn0k9aCxZgAVrTWcSEliDGXmePhi4J1xEjvS 0WoCq/jf5MKJZ7nfVo8Akc9MFaqKSvDzdJQMQGEjijZA5f2cng9zt1ek2EVtnjK62Cu3 3g4O83s8gs20jU2k0zxU51nH+49vz7Ir9ZKiqvdQoIJQJSeFHtEBZk7DLsUukmOpvPny 9S8kKPv5BpusAXNaSVH5eLGfC3Sioqu0Loo8sfwwY25N4dX2igQfNGYBs/IxDDuzyJtc osRszkArSHO8OG+XibkIDGvl2yGOVD7cp4wg82Bv84W+iGas0cjncN1svl88TNVwfGHz G8bA== X-Received: by 10.50.212.3 with SMTP id ng3mr165796igc.104.1357346378639; Fri, 04 Jan 2013 16:39:38 -0800 (PST) Received: from anchor.twiddle.home.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id as6sm940417igc.8.2013.01.04.16.39.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 04 Jan 2013 16:39:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 4 Jan 2013 16:39:26 -0800 Message-Id: <1357346373-13898-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1357346373-13898-1-git-send-email-rth@twiddle.net> References: <1357346373-13898-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.223.181 Cc: Blue Swirl , Riku Voipio Subject: [Qemu-devel] [PATCH 1/8] fdt: Use bswapN instead of bswap_N X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Fixes the libfdt enabled build for hosts that have . The code at the beginning of qemu/bswap.h is attempting to standardize on bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get. In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header and then wrap these with inline functions to get bswapN. Signed-off-by: Richard Henderson --- include/libfdt_env.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 7938d73..3667d4c 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -22,15 +22,15 @@ #include "qemu/bswap.h" #ifdef HOST_WORDS_BIGENDIAN -#define fdt32_to_cpu(x) (x) -#define cpu_to_fdt32(x) (x) -#define fdt64_to_cpu(x) (x) -#define cpu_to_fdt64(x) (x) +#define fdt32_to_cpu(x) (x) +#define cpu_to_fdt32(x) (x) +#define fdt64_to_cpu(x) (x) +#define cpu_to_fdt64(x) (x) #else -#define fdt32_to_cpu(x) (bswap_32((x))) -#define cpu_to_fdt32(x) (bswap_32((x))) -#define fdt64_to_cpu(x) (bswap_64((x))) -#define cpu_to_fdt64(x) (bswap_64((x))) +#define fdt32_to_cpu(x) bswap32(x) +#define cpu_to_fdt32(x) bswap32(x) +#define fdt64_to_cpu(x) bswap64(x) +#define cpu_to_fdt64(x) bswap64(x) #endif #endif /* _LIBFDT_ENV_H */