From patchwork Thu Feb 5 10:05:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 44419 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EB01421521 for ; Thu, 5 Feb 2015 10:05:57 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y19sf4602159wgg.2 for ; Thu, 05 Feb 2015 02:05:56 -0800 (PST) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=0YzU7Jv5yj2ya3kgUeFPFsLm8DDk/I7JfxXu/SYENI8=; b=gK7rwj00Q0jsq663qSELFyBMmuGepXhhZLJ8oWS/jRSAbff2RDhI60FnVgYhbD76f7 xYo1l/SlfpGadF1hjZv8U9TbuXj+dnT1SahVB8JZo7pdWo/LXZZvkFP8Qy34ZzE54q+v EST94xNuO0cjS+3aUyRL7TG2y9pOp/tC3hSTXmBSi8WTQM2a1g9JGT/iOxiuMjUDA5oE RCM+yCQR1GwpjJLgZ0xxWk+g+jD0sLZebWdL72oOl8shQvX0MbVmP5Y0WhdwQmIkPZmd CyR0ViYALj75F3W15XM9cdrpm7co1I6V3fCvsxpUpuQbNdBgRLdBcHpTAQx4ZBUPPZ0H 4foQ== X-Gm-Message-State: ALoCoQmXo6LA2UO3cFeEFTYJDVN9/eT5wQZnkOYwD/6DRCZCDOxVVYDyTZgG8DRUETG6CcnusMLI X-Received: by 10.180.109.13 with SMTP id ho13mr1110721wib.7.1423130756958; Thu, 05 Feb 2015 02:05:56 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.9 with SMTP id v9ls129411laa.34.gmail; Thu, 05 Feb 2015 02:05:56 -0800 (PST) X-Received: by 10.152.219.37 with SMTP id pl5mr2592760lac.6.1423130756730; Thu, 05 Feb 2015 02:05:56 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id mr6si3522662lbb.89.2015.02.05.02.05.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 02:05:56 -0800 (PST) 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 u10so6113768lbd.9 for ; Thu, 05 Feb 2015 02:05:56 -0800 (PST) X-Received: by 10.152.23.195 with SMTP id o3mr2559637laf.70.1423130756381; Thu, 05 Feb 2015 02:05:56 -0800 (PST) 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.35.133 with SMTP id h5csp1038586lbj; Thu, 5 Feb 2015 02:05:55 -0800 (PST) X-Received: by 10.224.88.1 with SMTP id y1mr6085508qal.91.1423130755221; Thu, 05 Feb 2015 02:05:55 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id o8si5482868qas.120.2015.02.05.02.05.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 02:05:55 -0800 (PST) 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 1YJJJn-0000jV-GQ; Thu, 05 Feb 2015 10:05:51 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJJJh-0000jQ-K7 for lng-odp@lists.linaro.org; Thu, 05 Feb 2015 10:05:45 +0000 Received: by mail-la0-f49.google.com with SMTP id gf13so6327077lab.8 for ; Thu, 05 Feb 2015 02:05:39 -0800 (PST) X-Received: by 10.112.63.196 with SMTP id i4mr2464563lbs.27.1423130739800; Thu, 05 Feb 2015 02:05:39 -0800 (PST) Received: from localhost.localdomain ([80.77.38.170]) by mx.google.com with ESMTPSA id v5sm868133lby.9.2015.02.05.02.05.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 02:05:39 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Thu, 5 Feb 2015 12:05:31 +0200 Message-Id: <1423130731-13545-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] linus-generic: debug: Allow formatted ODP_ASSERT 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: taras.kondratiuk@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 Signed-off-by: Taras Kondratiuk --- platform/linux-generic/include/odp_debug_internal.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/odp_debug_internal.h b/platform/linux-generic/include/odp_debug_internal.h index dec5c15..265d9be 100644 --- a/platform/linux-generic/include/odp_debug_internal.h +++ b/platform/linux-generic/include/odp_debug_internal.h @@ -32,10 +32,9 @@ extern "C" { /** * Runtime assertion-macro - aborts if 'cond' is false. */ -#define ODP_ASSERT(cond, msg) \ - do { if ((ODP_DEBUG == 1) && (!(cond))) { \ - ODP_ERR("%s\n", msg); \ - odp_global_data.abort_fn(); } \ +#define ODP_ASSERT(cond, fmt, ...) \ + do { if ((ODP_DEBUG == 1) && (!(cond))) \ + ODP_ABORT("%s\n", fmt, ##__VA_ARGS__); \ } while (0) /**