From patchwork Mon Dec 11 21:00:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 121464 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3279592qgn; Mon, 11 Dec 2017 13:02:02 -0800 (PST) X-Google-Smtp-Source: ACJfBosGZx2z//odTVYwIvFLn9fzNBShBIV0qNfhXp/aA9wzWF5+8DnGrn0qFgXN23k4ATsK20B1 X-Received: by 10.55.23.68 with SMTP id i65mr2387577qkh.179.1513026122437; Mon, 11 Dec 2017 13:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513026122; cv=none; d=google.com; s=arc-20160816; b=ENdiu6VmQ9I8oVgkgYni4jcQAxAS87GGegOZ3PNg6/qbkkY3t+hWFb8cEMwxYIvJE0 H/NJjbjxLxpyBELN6iCarbh4uIFwqQhjI5SYq2M/idCTTLDiE/eP6ssA9RLAqDvoRKra Fo7MmLrUWQulx4H5pZB6IlM3nD+z+9o+tR5205vNZzRDNpUMd+/FqlzS+mkUpo2049zj 4LirYUPcKE8UX33eHvpPHwTBt0ZHJf6/MoZu0SwyYKou2hFjIw/Mmx2RXNEt1oKYKVnI B3/zDcYXGOLgZjKKLuE62tz7x2GtBODKnfoO45Us7f8jOGsSF3uPc/eAPtBuCEkVdXHT va9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=m25+FpN69cRj8+xE5fvZ5Xj9kceUZa0UZwuXjyy0sGc=; b=qPE75anFQGS2pK+3r88fDH9+KjoyG9XQLzuSM9Lwr1kDsoeZK5NyOuDJKKnB5n+vXJ dglXdWaPIoEf2I/3NMOBvrqkRcDsRhG3aWwiW3jeDaVFCLb4kN5qFUv76B7+DQD9IHIo htlOGEf3DqmZ3kZvmJnmR1mVk7bThbr24Q8Urxua9pVl6UUMAL4mrbifwinIOR/1RbYK if6JC/iGEnhxO/PbeMPCY6muYsq6tAYP9r549rJqhNQe883TiZ00ppwu9LDbSTYn4ScA T7d4C+pgbDy0hmP6MQlw3FCmG0wi6omd4tB9aimeYqkVLzQ7L1zByMThYKuSXKLQLO83 FTQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id l75si2855052qke.56.2017.12.11.13.02.02; Mon, 11 Dec 2017 13:02:02 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1CF4760956; Mon, 11 Dec 2017 21:02:02 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 7015F6098A; Mon, 11 Dec 2017 21:00:36 +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 4B477608E6; Mon, 11 Dec 2017 21:00:27 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 13AA36074A for ; Mon, 11 Dec 2017 21:00:25 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 9F71C2D81411 for ; Tue, 12 Dec 2017 00:00:23 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8ngjrCq5ad-0NVKggmR; Tue, 12 Dec 2017 00:00:23 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id YE9KORLQTE-0Mb037C7; Tue, 12 Dec 2017 00:00:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 12 Dec 2017 00:00:20 +0300 Message-Id: <1513026020-24993-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513026020-24993-1-git-send-email-odpbot@yandex.ru> References: <1513026020-24993-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 325 Subject: [lng-odp] [PATCH v3 3/3] linux-generic: pool: avoid direct use of printf() in odp_pool_print() 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer Use ODP_PRINT() rather than printf() to send output through the log function. Signed-off-by: Bill Fischofer --- /** Email created from pull request 325 (Bill-Fischofer-Linaro:bug3465) ** https://github.com/Linaro/odp/pull/325 ** Patch: https://github.com/Linaro/odp/pull/325.patch ** Base sha: 6881620135a179911a5839d4be97423a8d80e5ab ** Merge commit sha: 031d1e139f0c3b25b906fc9c79120fd327a758c4 **/ platform/linux-generic/odp_pool.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index d0e4674f9..abd5ef07a 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -924,33 +924,33 @@ void odp_pool_print(odp_pool_t pool_hdl) pool = pool_entry_from_hdl(pool_hdl); - printf("\nPool info\n"); - printf("---------\n"); - printf(" pool %" PRIu64 "\n", - odp_pool_to_u64(pool->pool_hdl)); - printf(" name %s\n", pool->name); - printf(" pool type %s\n", - pool->params.type == ODP_POOL_BUFFER ? "buffer" : - (pool->params.type == ODP_POOL_PACKET ? "packet" : - (pool->params.type == ODP_POOL_TIMEOUT ? "timeout" : - "unknown"))); - printf(" pool shm %" PRIu64 "\n", - odp_shm_to_u64(pool->shm)); - printf(" user area shm %" PRIu64 "\n", - odp_shm_to_u64(pool->uarea_shm)); - printf(" num %u\n", pool->num); - printf(" align %u\n", pool->align); - printf(" headroom %u\n", pool->headroom); - printf(" seg len %u\n", pool->seg_len); - printf(" max data len %u\n", pool->max_len); - printf(" tailroom %u\n", pool->tailroom); - printf(" block size %u\n", pool->block_size); - printf(" uarea size %u\n", pool->uarea_size); - printf(" shm size %u\n", pool->shm_size); - printf(" base addr %p\n", pool->base_addr); - printf(" uarea shm size %u\n", pool->uarea_shm_size); - printf(" uarea base addr %p\n", pool->uarea_base_addr); - printf("\n"); + ODP_PRINT("\nPool info\n"); + ODP_PRINT("---------\n"); + ODP_PRINT(" pool %" PRIu64 "\n", + odp_pool_to_u64(pool->pool_hdl)); + ODP_PRINT(" name %s\n", pool->name); + ODP_PRINT(" pool type %s\n", + pool->params.type == ODP_POOL_BUFFER ? "buffer" : + (pool->params.type == ODP_POOL_PACKET ? "packet" : + (pool->params.type == ODP_POOL_TIMEOUT ? "timeout" : + "unknown"))); + ODP_PRINT(" pool shm %" PRIu64 "\n", + odp_shm_to_u64(pool->shm)); + ODP_PRINT(" user area shm %" PRIu64 "\n", + odp_shm_to_u64(pool->uarea_shm)); + ODP_PRINT(" num %u\n", pool->num); + ODP_PRINT(" align %u\n", pool->align); + ODP_PRINT(" headroom %u\n", pool->headroom); + ODP_PRINT(" seg len %u\n", pool->seg_len); + ODP_PRINT(" max data len %u\n", pool->max_len); + ODP_PRINT(" tailroom %u\n", pool->tailroom); + ODP_PRINT(" block size %u\n", pool->block_size); + ODP_PRINT(" uarea size %u\n", pool->uarea_size); + ODP_PRINT(" shm size %u\n", pool->shm_size); + ODP_PRINT(" base addr %p\n", pool->base_addr); + ODP_PRINT(" uarea shm size %u\n", pool->uarea_shm_size); + ODP_PRINT(" uarea base addr %p\n", pool->uarea_base_addr); + ODP_PRINT("\n"); } odp_pool_t odp_buffer_pool(odp_buffer_t buf)