From patchwork Thu May 26 23:46:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 68718 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp658677qge; Thu, 26 May 2016 16:48:01 -0700 (PDT) X-Received: by 10.140.173.212 with SMTP id t203mr11489819qht.89.1464306481217; Thu, 26 May 2016 16:48:01 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i38si15063086qte.47.2016.05.26.16.48.00; Thu, 26 May 2016 16:48:01 -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 CDF0467462; Thu, 26 May 2016 23:48:00 +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_H2, 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 9D80767453; Thu, 26 May 2016 23:47:03 +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 CFD0661714; Thu, 26 May 2016 23:46:59 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id D599161714 for ; Thu, 26 May 2016 23:46:58 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id j1so149237616oih.3 for ; Thu, 26 May 2016 16:46:58 -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=DMlJss8qbIjYJ/lZ8cNzGuW/a9RsOKE8zMisvUQ6Na+0vVcZCKFymZ6Ujhxd8nF9k2 laM44abYNEgaymUbtowvqXAOtlrrepyFX7m8JJfLMuFg8qbYmfCuwxBsgIKVCcQr10XR hS1weTvuNzTm3SDgmMlMjV/CJTXeIGSQ6BJFQOPbVKykTpt8Hotoc4qokQbAi4LbI/mE 8qDzfFMWPvdNh/dyY3HHkLgNi58yRrNo9JPL+awTcymjmYl5R5JminoNxzS6qyplQPfZ Efx4V6h0d3pw5TlKup0L2dd3zWMelFKDn/3PGWWvkYvWIcmDqQhraQDQfXGBcuza/Ifc eQ8g== X-Gm-Message-State: ALyK8tLu1xp4q8m6Ye2FDI5w9/HamNG2zGjrCm50DNrKATjYskozoG1peVmHg6Ov875fTPAbLJE= X-Received: by 10.202.86.216 with SMTP id k207mr6180673oib.181.1464306418317; Thu, 26 May 2016 16:46:58 -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 c7sm7720581oia.8.2016.05.26.16.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 16:46:56 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 26 May 2016 18:46:42 -0500 Message-Id: <1464306409-7325-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464306409-7325-1-git-send-email-bill.fischofer@linaro.org> References: <1464306409-7325-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 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); }