From patchwork Wed Jun 11 16:39:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 31797 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 737642054B for ; Wed, 11 Jun 2014 16:42:07 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oz11sf17291203veb.7 for ; Wed, 11 Jun 2014 09:42:07 -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=EYDKPHKQxNI0q5mqpLed378SJQL97bUvn+KWQR594hQ=; b=SmF4RmTUkNWHBLkmRoCMSh3KuQ160DJsVOnx1Sp4fxIXun5SFJVp1R43dpTLsOwt7s mwoGTqBNxz2o8QTNJf39DcwMP5kRrH7quyer06t5R8hdYN11kuPuIyjiPqNlYd2Phh6F g875kE6+x+4bz8+Lz1TgVLhPGsObILWwqgDbrKgeR3cSXv1tkAeDrD6eBo07tkLdwKBS KZ2VVdeMpx5NG2DJU9IQx4L8a9boCw74czyHgjV2vyjOdBwSVS8Cr8CwqhyXrM+EuwjR RQ1seYIYHnkSvGXMGYWaeccpZqFr2Cu9mpJLQsNzDpEKsoHK/fBFvXZm19AFeDVyKA// tt7g== X-Gm-Message-State: ALoCoQm6SoU5SZAKv9ax1JgDDMFBSz8rgnaimdHHs4eXkB1ZaZz48S96ZgO4Cxwi9Jpwbd8+T5Pa X-Received: by 10.58.107.203 with SMTP id he11mr701774veb.12.1402504927212; Wed, 11 Jun 2014 09:42:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.51 with SMTP id 48ls2691525qgu.23.gmail; Wed, 11 Jun 2014 09:42:07 -0700 (PDT) X-Received: by 10.58.160.164 with SMTP id xl4mr3954549veb.38.1402504927053; Wed, 11 Jun 2014 09:42:07 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id kj8si14370207vdb.27.2014.06.11.09.42.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 09:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so8451403veb.21 for ; Wed, 11 Jun 2014 09:42:07 -0700 (PDT) X-Received: by 10.58.126.135 with SMTP id my7mr40941765veb.27.1402504926973; Wed, 11 Jun 2014 09:42:06 -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.54.6 with SMTP id vs6csp317931vcb; Wed, 11 Jun 2014 09:42:06 -0700 (PDT) X-Received: by 10.229.127.9 with SMTP id e9mr52931118qcs.5.1402504926549; Wed, 11 Jun 2014 09:42:06 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id h90si2539442qge.29.2014.06.11.09.42.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 11 Jun 2014 09:42:06 -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 1WulZU-00014N-HJ; Wed, 11 Jun 2014 16:40:20 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WulZT-00013W-C5 for xen-devel@lists.xen.org; Wed, 11 Jun 2014 16:40:19 +0000 Received: from [85.158.143.35:9956] by server-1.bemta-4.messagelabs.com id A5/FF-09853-27688935; Wed, 11 Jun 2014 16:40:18 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1402504816!10734442!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8196 invoked from network); 11 Jun 2014 16:40:17 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 11 Jun 2014 16:40:17 -0000 X-IronPort-AV: E=Sophos;i="5.01,459,1400025600"; d="scan'208";a="142556072" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 11 Jun 2014 16:40:05 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 11 Jun 2014 12:40:05 -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 1WulZE-0004h3-SD; Wed, 11 Jun 2014 17:40:04 +0100 From: Ian Campbell To: Date: Wed, 11 Jun 2014 17:39:58 +0100 Message-ID: <1402504804-29173-2-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402504640.16332.50.camel@kazak.uk.xensource.com> References: <1402504640.16332.50.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v2 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.128.176 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 --- 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 670a82d..9a503ef 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -332,6 +332,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__)