From patchwork Fri Jun 3 10:12:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 69237 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp184383qgf; Fri, 3 Jun 2016 03:15:08 -0700 (PDT) X-Received: by 10.141.5.213 with SMTP id h204mr2369577qhd.85.1464948908655; Fri, 03 Jun 2016 03:15:08 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i65si1911382qkf.224.2016.06.03.03.15.08; Fri, 03 Jun 2016 03:15:08 -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 50216617B2; Fri, 3 Jun 2016 10:15:08 +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 83300617C3; Fri, 3 Jun 2016 10:14: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 015DD617BF; Fri, 3 Jun 2016 10:13:58 +0000 (UTC) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id 4267D617C1 for ; Fri, 3 Jun 2016 10:12:42 +0000 (UTC) Received: by mail-lf0-f41.google.com with SMTP id w16so51323123lfd.2 for ; Fri, 03 Jun 2016 03:12:42 -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=gyPLj1I0SzwVfM1ZXkQoDUzCKznGMS5umvLp9TZxROU=; b=ZecT4j2RCc3bG0wuZr5pWh1iAqbJyNxtpYefeDLIaup07gswNeVP98ybMtJ+a38MXH f5zfulPBbXE+ON+7pP9BlbwStz32/fUb58UjLsGeLA1kX9/4BBmX7LNWgbmOkzE/xY4Z KN7d93wxCjtj+1+zmwxSp4Eew8hlCWbkvq1Tl/GcGTiuG0Qv+YPcQyg9/ePzSVI8Ufdg Kl6+TI8B9UOcQfFNCiIzG6gLLt5n6E+6oS546vv/V6v+joj8A+ytdtX9RT9yV9+qPTE5 5pxhzpmPjr+ZLm4r3Wd3Bdj2nDqe6WG1yIY1/V8blXyBz+1TLow+V3jZp1Uc1poykUHL dsxA== X-Gm-Message-State: ALyK8tLaGMymcw3PastcVK0yYUhtrK5NFUUheVfXzXKBAmKfnp2TZPYtbSTUU8Oe06XYxmL5gfQ= X-Received: by 10.46.1.33 with SMTP id 33mr773817ljb.44.1464948761167; Fri, 03 Jun 2016 03:12:41 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id 1sm327712ljf.5.2016.06.03.03.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jun 2016 03:12:40 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 3 Jun 2016 13:12:31 +0300 Message-Id: <1464948753-942-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 In-Reply-To: <1464948753-942-1-git-send-email-maxim.uvarov@linaro.org> References: <1464948753-942-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/4] linux-generic: tm: dump: shift code on one tab left 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" No functinal change. Just make more room for code. Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_name_table.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c index 438630e..690cf7a 100644 --- a/platform/linux-generic/odp_name_table.c +++ b/platform/linux-generic/odp_name_table.c @@ -213,23 +213,23 @@ static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl) count = 0; for (idx = 0; idx < SECONDARY_HASH_TBL_SIZE; idx++) { hash_tbl_entry = secondary_hash_tbl->hash_entries[idx]; - if (hash_tbl_entry != 0) { - if ((hash_tbl_entry & 0x3F) != 0) { - name_tbl_entry = (name_tbl_entry_t *) - (uintptr_t)(hash_tbl_entry & ~0x3F); - entry_cnt = hash_tbl_entry & 0x3F; - list_cnt = linked_list_len(name_tbl_entry); - if (entry_cnt != list_cnt) - ODP_DBG("%s idx=%u entry_cnt=%u " - "list_cnt=%u\n", - __func__, - idx, entry_cnt, list_cnt); + if (!hash_tbl_entry) + break; + if ((hash_tbl_entry & 0x3F) != 0) { + name_tbl_entry = (name_tbl_entry_t *) + (uintptr_t)(hash_tbl_entry & ~0x3F); + entry_cnt = hash_tbl_entry & 0x3F; + list_cnt = linked_list_len(name_tbl_entry); + if (entry_cnt != list_cnt) + ODP_DBG("%s idx=%u entry_cnt=%u " + "list_cnt=%u\n", + __func__, + idx, entry_cnt, list_cnt); - count += entry_cnt; - } else { - ODP_DBG("%s inner secondary tbl\n", - __func__); - } + count += entry_cnt; + } else { + ODP_DBG("%s inner secondary tbl\n", + __func__); } }