From patchwork Thu Oct 30 20:47:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 39850 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E121520C70 for ; Thu, 30 Oct 2014 20:47:52 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf3379551lbv.5 for ; Thu, 30 Oct 2014 13:47:51 -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:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=EPaDOeYwdyaDQNjnjPHoWw25zKcFy+j7spwv2R/NHTg=; b=cvM6/gPhHQS9GDHNPg591lzIuPO7I46HtEPnil0Od4sO2uOuFIh4xFMkfo/v3GfKUd kc68tQg5Hu/wWn3lzxWfeJlfsw2MixUdfA1DPRT3/aqbIegmFnq8G3+2m/C3E+0IIXHh wF20P4cP4Q9/zZQ0mEMLVrAwtP/LxJITWFzJK0OphwHbIvfMZ46H6TmMEdFczdL1uxsi 7ZwHzfCRubgrnIb+LDPWQrWx3dR66wE25Yr34OK12o1az3AZk2b2HUGnyAMsfw/GGZxy RbanW8QzqKbQ4X6uU+VojX2bidTLs6VXcbcn6OnqJbdR/bPPpfcpRUidiJO5elQksBcU F8Yg== X-Gm-Message-State: ALoCoQlKGQdz0hC8GBco5T/9yKnjyonrxF9FunuA5dGFx+/1sCD8axisxzBAahoSqLIJLNYCBw38 X-Received: by 10.112.137.202 with SMTP id qk10mr768367lbb.11.1414702071762; Thu, 30 Oct 2014 13:47:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.225 with SMTP id p1ls393824laf.70.gmail; Thu, 30 Oct 2014 13:47:51 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr21305646laz.27.1414702071373; Thu, 30 Oct 2014 13:47:51 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id b6si13672659lbv.138.2014.10.30.13.47.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Oct 2014 13:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so5567848lbj.37 for ; Thu, 30 Oct 2014 13:47:51 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr21525561lbb.80.1414702071285; Thu, 30 Oct 2014 13:47:51 -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.112.84.229 with SMTP id c5csp106206lbz; Thu, 30 Oct 2014 13:47:50 -0700 (PDT) X-Received: by 10.224.128.68 with SMTP id j4mr29950456qas.91.1414702069943; Thu, 30 Oct 2014 13:47:49 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id c90si14050792qgf.111.2014.10.30.13.47.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 30 Oct 2014 13:47:49 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XjwdI-0004jm-38; Thu, 30 Oct 2014 20:47:48 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xjwd2-0004iI-45 for lng-odp@lists.linaro.org; Thu, 30 Oct 2014 20:47:32 +0000 Received: by mail-la0-f46.google.com with SMTP id hs14so5062846lab.5 for ; Thu, 30 Oct 2014 13:47:26 -0700 (PDT) X-Received: by 10.112.63.70 with SMTP id e6mr13455160lbs.93.1414702046342; Thu, 30 Oct 2014 13:47:26 -0700 (PDT) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id z5sm3617929lae.21.2014.10.30.13.47.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2014 13:47:25 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Thu, 30 Oct 2014 21:47:14 +0100 Message-Id: <1414702035-3549-4-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414702035-3549-1-git-send-email-anders.roxell@linaro.org> References: <1414702035-3549-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/4] odp_debug.h: ensure the macro is always compiled X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 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 To ensure there is no stale code that can be broken over time. Signed-off-by: Anders Roxell --- platform/linux-generic/include/api/odp_debug.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/linux-generic/include/api/odp_debug.h b/platform/linux-generic/include/api/odp_debug.h index 0a20430..c9b2edd 100644 --- a/platform/linux-generic/include/api/odp_debug.h +++ b/platform/linux-generic/include/api/odp_debug.h @@ -57,12 +57,11 @@ extern "C" { /** * Runtime assertion-macro - aborts if 'cond' is false. */ -#ifndef ODP_NO_DEBUG #define ODP_ASSERT(cond, msg) \ - do { if (!(cond)) {ODP_ERR("%s\n", msg); abort(); } } while (0) -#else -#define ODP_ASSERT(cond, msg) -#endif + do { if ((ODP_DEBUG == 1) && (!(cond))) { \ + ODP_ERR("%s\n", msg); \ + abort(); } \ + } while (0) /** * Compile time assertion-macro - fail compilation if cond is false.