From patchwork Thu Jun 26 10:17:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32545 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6541A2066E for ; Thu, 26 Jun 2014 10:19:00 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q107sf4714594qgd.3 for ; Thu, 26 Jun 2014 03:19:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=iYUYeyUdNcPvBbREDi6gzLSDn3G1KRni3ghrqO1ajuA=; b=FWBEwrJ12j8egju1LsMldWCa4/8mpU1kloU4ljytzMH3PE/vREteW5j/yhtVYmfSA4 ey6lB1rnP9PZXexb0igPSo7uuOOMynA4w6R3zPLkkOhz6jysXpTn8cS8LEfKscb5caM7 42r3XtlJKH/dk4UkelsChuT4rYRnhfDLDl2UoXhNLRUXE2JnOdCgg0jvC1SEkHbuW7Ur WTOOfkJIYVz43tMa+QU7QLkmGL7sLJ5B30ser/l/+mdSbDROsJhfdl9BoFVDCjpsJju0 QrvFvZzDtvR96eitIdWT9gPzMHA6pJuOyQM3kC5aL6y41xnLdZ6U2U5kErMTJjjnelga ymHA== X-Gm-Message-State: ALoCoQn6V97lJm2p4odVSqhxHPNlYSkJfy8IuMoSs1hP1qNiDi6XxKhW4R6wNJBkkxRBjtNzAD9d X-Received: by 10.58.229.227 with SMTP id st3mr7390118vec.5.1403777940119; Thu, 26 Jun 2014 03:19:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.85 with SMTP id 79ls151317qgk.41.gmail; Thu, 26 Jun 2014 03:19:00 -0700 (PDT) X-Received: by 10.58.8.12 with SMTP id n12mr12395686vea.28.1403777940047; Thu, 26 Jun 2014 03:19:00 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ir5si4053944vcb.82.2014.06.26.03.19.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 03:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so3247660vcb.17 for ; Thu, 26 Jun 2014 03:19:00 -0700 (PDT) X-Received: by 10.58.220.230 with SMTP id pz6mr12431396vec.9.1403777939976; Thu, 26 Jun 2014 03:18:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp19456vcb; Thu, 26 Jun 2014 03:18:59 -0700 (PDT) X-Received: by 10.140.25.120 with SMTP id 111mr13414526qgs.95.1403777939360; Thu, 26 Jun 2014 03:18:59 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k31si8597078qge.52.2014.06.26.03.18.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Jun 2014 03:18:59 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X06k7-000663-0t; Thu, 26 Jun 2014 10:17:23 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X06k5-00065B-Ft for xen-devel@lists.xen.org; Thu, 26 Jun 2014 10:17:21 +0000 Received: from [193.109.254.147:64810] by server-13.bemta-14.messagelabs.com id 05/63-23211-033FBA35; Thu, 26 Jun 2014 10:17:20 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1403777838!13757819!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16136 invoked from network); 26 Jun 2014 10:17:20 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jun 2014 10:17:20 -0000 X-IronPort-AV: E=Sophos;i="5.01,552,1400025600"; d="scan'208";a="147289037" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 26 Jun 2014 10:17:19 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Thu, 26 Jun 2014 06:17:17 -0400 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=marilith-n13.uk.xensource.com.) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1X06k1-0004Wh-EJ; Thu, 26 Jun 2014 11:17:17 +0100 From: Ian Campbell To: Date: Thu, 26 Jun 2014 11:17:11 +0100 Message-ID: <1403777837-16779-2-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403777793.16595.21.camel@kazak.uk.xensource.com> References: <1403777793.16595.21.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Jackson , julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v3 2/8] tools/libxc: pull min/max_t into xc_private.h X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: There are generally useful. Signed-off-by: Ian Campbell Acked-by: Julien Grall Cc: Ian Jackson Acked-by: Ian Jackson --- v2: New patch. --- tools/libxc/xc_dom_decompress_unsafe_xz.c | 5 ----- tools/libxc/xc_private.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xc_dom_decompress_unsafe_xz.c b/tools/libxc/xc_dom_decompress_unsafe_xz.c index 2a32d40..6be1f89 100644 --- a/tools/libxc/xc_dom_decompress_unsafe_xz.c +++ b/tools/libxc/xc_dom_decompress_unsafe_xz.c @@ -40,11 +40,6 @@ static inline u32 le32_to_cpup(const u32 *p) (void) (&_x == &_y); \ _x < _y ? _x : _y; }) -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) -#define max_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) - #define __force #define always_inline diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index c7730f2..47a2801 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -349,6 +349,11 @@ int xc_ffs16(uint16_t x); int xc_ffs32(uint32_t x); int xc_ffs64(uint64_t x); +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) +#define max_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) + #define DOMPRINTF(fmt, args...) xc_dom_printf(dom->xch, fmt, ## args) #define DOMPRINTF_CALLED(xch) xc_dom_printf((xch), "%s: called", __FUNCTION__)