From patchwork Thu Dec 4 22:08:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 41956 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0067425E8C for ; Thu, 4 Dec 2014 22:08:32 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf11691381eek.10 for ; Thu, 04 Dec 2014 14:08:31 -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=xhBPQpvKh1GdQCBW5v4TYmDN/qGAk9YFteL2VDbc7sM=; b=bNEPbDpSWkW0y/m71fKg5tSlxdB8lPtGRmMW2uSXABx7XurD0FLvwiQCPOJ7z+oJNg UdwOQ00cPNxQPEiLWubxLEBY7Jxo7/0vfQii2UJ6LzHdsxEmJTrmslBaM3KUSSsGfIDQ lZuHxb/zJjhOXPlGJWEecwNrnFWbfhyPEnkawHmAcIs3xdEWWKct0Q41gnO0sigZb/eJ sypv13tJzbG2h1f86wT9ElkdCHJ6BUlKLSHoUt6NIaE+y7Klfto3B/l/6gR3hT20Kn8I FpePuqHWQit8SL5S/LWa5ORwth+4rxVh/Z5Fo38OD3Tl8cVZAsGTH0KFWABU+EB849ZZ paBQ== X-Gm-Message-State: ALoCoQlVX1klSEeQ0ma0bUHdw1Wy2PRVsBt8+DtEtqqH/nWKdUjVrqnNuJ3ft+PeHuN0XMA1PGN+ X-Received: by 10.112.72.106 with SMTP id c10mr10751lbv.15.1417730910881; Thu, 04 Dec 2014 14:08:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.9 with SMTP id f9ls297251laa.66.gmail; Thu, 04 Dec 2014 14:08:30 -0800 (PST) X-Received: by 10.152.44.167 with SMTP id f7mr11827925lam.30.1417730910736; Thu, 04 Dec 2014 14:08:30 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id j7si17116025laf.119.2014.12.04.14.08.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 14:08:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pn19so14595412lab.9 for ; Thu, 04 Dec 2014 14:08:30 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr11616614laz.71.1417730910602; Thu, 04 Dec 2014 14:08:30 -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.184.201 with SMTP id ew9csp120209lbc; Thu, 4 Dec 2014 14:08:29 -0800 (PST) X-Received: by 10.229.248.132 with SMTP id mg4mr19944738qcb.29.1417730909032; Thu, 04 Dec 2014 14:08:29 -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 i65si32905211qgd.0.2014.12.04.14.08.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Dec 2014 14:08:29 -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 1XweZW-0003nS-G4; Thu, 04 Dec 2014 22:08:26 +0000 Received: from mail-qa0-f50.google.com ([209.85.216.50]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XweZP-0003nN-Fc for lng-odp@lists.linaro.org; Thu, 04 Dec 2014 22:08:19 +0000 Received: by mail-qa0-f50.google.com with SMTP id w8so12337612qac.23 for ; Thu, 04 Dec 2014 14:08:14 -0800 (PST) X-Received: by 10.140.104.236 with SMTP id a99mr19725172qgf.56.1417730894267; Thu, 04 Dec 2014 14:08:14 -0800 (PST) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id g66sm27843676qgf.37.2014.12.04.14.08.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Dec 2014 14:08:13 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 4 Dec 2014 17:08:04 -0500 Message-Id: <1417730884-42082-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] api: move internal debug macros 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: mike.holmes@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.215.50 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 Remove the following from the external API and make them internal ODP_DBG ODP_ERR ODP_ABORT Signed-off-by: Mike Holmes Reviewed-by: Bill Fischofer --- Depends on [PATCH] example: test: remove use of internal ODP macros platform/linux-generic/include/api/odp_debug.h | 24 ---------------------- .../linux-generic/include/odp_debug_internal.h | 24 ++++++++++++++++++++++ platform/linux-generic/odp_buffer_pool.c | 2 +- platform/linux-generic/odp_coremask.c | 2 +- platform/linux-generic/odp_linux.c | 2 +- platform/linux-generic/odp_packet.c | 1 + platform/linux-generic/odp_packet_io.c | 2 +- platform/linux-generic/odp_packet_socket.c | 1 + platform/linux-generic/odp_queue.c | 2 +- platform/linux-generic/odp_ring.c | 2 +- platform/linux-generic/odp_schedule.c | 2 +- platform/linux-generic/odp_system_info.c | 2 +- platform/linux-generic/odp_thread.c | 2 +- platform/linux-generic/odp_timer.c | 2 +- 14 files changed, 36 insertions(+), 34 deletions(-) diff --git a/platform/linux-generic/include/api/odp_debug.h b/platform/linux-generic/include/api/odp_debug.h index 1f5eaff..cb2c3e9 100644 --- a/platform/linux-generic/include/api/odp_debug.h +++ b/platform/linux-generic/include/api/odp_debug.h @@ -112,30 +112,6 @@ extern int odp_override_log(odp_log_level_e level, const char *fmt, ...); #define ODP_PRINT(fmt, ...) \ odp_override_log(ODP_LOG_PRINT, " " fmt, ##__VA_ARGS__) -/** - * Log debug message if ODP_DEBUG_PRINT flag is set. - */ -#define ODP_DBG(fmt, ...) \ - do { \ - if (ODP_DEBUG_PRINT == 1) \ - ODP_LOG(ODP_LOG_DBG, fmt, ##__VA_ARGS__);\ - } while (0) - -/** - * Log error message. - */ -#define ODP_ERR(fmt, ...) \ - ODP_LOG(ODP_LOG_ERR, fmt, ##__VA_ARGS__) - -/** - * Log abort message and then stop execution (by default call abort()). - * This function should not return. - */ -#define ODP_ABORT(fmt, ...) \ - do { \ - ODP_LOG(ODP_LOG_ABORT, fmt, ##__VA_ARGS__); \ - abort(); \ - } while (0) /** * @} diff --git a/platform/linux-generic/include/odp_debug_internal.h b/platform/linux-generic/include/odp_debug_internal.h index ee3c543..647ebde 100644 --- a/platform/linux-generic/include/odp_debug_internal.h +++ b/platform/linux-generic/include/odp_debug_internal.h @@ -29,6 +29,30 @@ extern "C" { odp_override_log(ODP_LOG_UNIMPLEMENTED, \ "%s:%d:The function %s() is not implemented\n", \ __FILE__, __LINE__, __func__) +/** + * Log debug message if ODP_DEBUG_PRINT flag is set. + */ +#define ODP_DBG(fmt, ...) \ + do { \ + if (ODP_DEBUG_PRINT == 1) \ + ODP_LOG(ODP_LOG_DBG, fmt, ##__VA_ARGS__);\ + } while (0) + +/** + * Log error message. + */ +#define ODP_ERR(fmt, ...) \ + ODP_LOG(ODP_LOG_ERR, fmt, ##__VA_ARGS__) + +/** + * Log abort message and then stop execution (by default call abort()). + * This function should not return. + */ +#define ODP_ABORT(fmt, ...) \ + do { \ + ODP_LOG(ODP_LOG_ABORT, fmt, ##__VA_ARGS__); \ + abort(); \ + } while (0) #ifdef __cplusplus } diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index 6a0a6b2..aaf77a3 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_coremask.c b/platform/linux-generic/odp_coremask.c index c7438cc..54cd333 100644 --- a/platform/linux-generic/odp_coremask.c +++ b/platform/linux-generic/odp_coremask.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_linux.c b/platform/linux-generic/odp_linux.c index 11f76c9..ecd77b3 100644 --- a/platform/linux-generic/odp_linux.c +++ b/platform/linux-generic/odp_linux.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include typedef struct { diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index f8fd8ef..a1bf18e 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 706a3cc..7e3eca2 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c index 68983eb..d70a674 100644 --- a/platform/linux-generic/odp_packet_socket.c +++ b/platform/linux-generic/odp_packet_socket.c @@ -36,6 +36,7 @@ #include #include +#include #include #include diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 1318bcd..c278094 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_ring.c b/platform/linux-generic/odp_ring.c index 1d3130a..66e1631 100644 --- a/platform/linux-generic/odp_ring.c +++ b/platform/linux-generic/odp_ring.c @@ -78,7 +78,7 @@ #include #include #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index cc84e11..7c09c23 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 10665bb..7d18573 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/platform/linux-generic/odp_thread.c b/platform/linux-generic/odp_thread.c index dcb893d..faa12a2 100644 --- a/platform/linux-generic/odp_thread.c +++ b/platform/linux-generic/odp_thread.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 313c713..a4fef58 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include