From patchwork Wed May 25 23:36:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 68651 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp113072qge; Wed, 25 May 2016 16:44:46 -0700 (PDT) X-Received: by 10.200.35.99 with SMTP id b32mr6301790qtb.103.1464219886886; Wed, 25 May 2016 16:44:46 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c65si10614256qhd.2.2016.05.25.16.44.46; Wed, 25 May 2016 16:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 44065617FA; Wed, 25 May 2016 23:44:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BB4326163C; Wed, 25 May 2016 23:44:41 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6966161673; Wed, 25 May 2016 23:44:40 +0000 (UTC) Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by lists.linaro.org (Postfix) with ESMTPS id C612E6161B for ; Wed, 25 May 2016 23:44:39 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id dh6so3624588obb.1 for ; Wed, 25 May 2016 16:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cPcNAYz9CtY1zbCQS2iuZGnOxtIooXm9C47dQZHk350=; b=SdclUEsiJdvvkCrY8wRiONODjmXKQbAQzSH1vAMI8aKEhu+ERMwmG3BsNEbVo5ocMl yw/CONf8xBV55p/GyN31gzlDcXnK5vdbOzipzXM1oLWUWklxkD6ZGkbUUFAMhbq0ESU9 Xm7ebh9aSf8aDmRrvb8Kf6aa0hd2xVNA1LUwqoO0UJzxBCCTZQR5qxjip5qDxKKdE71i HvM0LzmxczxuoHX1WEpoRqWhWE1/mbjDne1CMeYQI+Cvn7c8JLOwk4ACQDGUR/TbcYM4 rWpKoYrhtlGE2CTPsVJjGEiB8zd7xIZBR2aDLe/2H1so2NAJho0nGCgVw132LShasA2A k2Bw== X-Gm-Message-State: ALyK8tIN6lhHsp9ZHdCXi8i8wgU/RCmZ8ixrZxZdX1swcsC+lgdUSnHpL+5vy2ODmOb+PtTiRYc= X-Received: by 10.157.46.90 with SMTP id c26mr4384161otd.121.1464219433510; Wed, 25 May 2016 16:37:13 -0700 (PDT) Received: from localhost.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id l65sm5103562otc.28.2016.05.25.16.37.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 May 2016 16:37:13 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 25 May 2016 18:36:56 -0500 Message-Id: <1464219423-14977-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464219423-14977-1-git-send-email-bill.fischofer@linaro.org> References: <1464219423-14977-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 03/10] validation: tm: add debug check to avoid unreachable code X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Signed-off-by: Bill Fischofer --- test/validation/traffic_mngr/traffic_mngr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/validation/traffic_mngr/traffic_mngr.c b/test/validation/traffic_mngr/traffic_mngr.c index e459d66..2bbcc1d 100644 --- a/test/validation/traffic_mngr/traffic_mngr.c +++ b/test/validation/traffic_mngr/traffic_mngr.c @@ -21,6 +21,8 @@ #include "odp_cunit_common.h" #include "traffic_mngr.h" +#define TM_DEBUG 0 + #define MAX_CAPABILITIES 16 #define MAX_NUM_IFACES 2 #define MAX_TM_SYSTEMS 3 @@ -1674,7 +1676,9 @@ static void dump_tm_tree(uint32_t tm_idx) { tm_node_desc_t *root_node_desc; - return; + if (!TM_DEBUG) + return; + root_node_desc = root_node_descs[tm_idx]; dump_tm_subtree(root_node_desc); }