From patchwork Tue Jul 25 22:21:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 27186 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 4FFAB377E; Wed, 26 Jul 2017 00:21:25 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id C8D9A201 for ; Wed, 26 Jul 2017 00:21:17 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 80CED21102; Tue, 25 Jul 2017 18:21:17 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 25 Jul 2017 18:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=1D4 sEH+wT1nLlDw3Wq1o124MLrlhN+pCysYeGmXLHUg=; b=YVk58rQjNMwVUt8QjtE lC8ZfevNrZURhYD4ph62mDwr/pIQaUdo6ib5GhwnZNVYR2tNVB6ZHGr4cy+yNrVv MzWmy+7sK0Jm88GxZB/8tEvFbhQ0rftcVMkYNW/xoEkJfiGPj1ygblt4TtMmkOyi tgeN3Wbx9FPpreAsNHfNyg9I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=1D4sEH+wT1nLlDw3Wq1o124MLrlhN+pCysYeGmXLH Ug=; b=F2pj9w6eSKfgrHGf7BqJok1mMADjQaQ25mSy4ZL7g1fP/MwqEnj6JYW+9 ime4tUDZ93lElA5O1bLSkmeQQJ+rGXfE9PfGUTDJuT8xjGoRXwBCQOPHn9GCgpoi yt+6OrD92hvd/IpmF/pwIwK49N7I24NkLi/p0UJONRnmmAi7oHgCxh+jc+1w1zVa Gy81QvjceKMPZA+0XRv4pqvlH1aK4njs3/xwYdgGQttAV4QFrRbjV+oBKItpTvIL 9luVVDysVCZgKJ1lXFMBt7JeiHmBEIW4s2QVJpoY5OLrGEUMdI6uK69QvhRZS5nO CDAI5Gh76vYwOPB3owGDEJs5+tHyQ== X-ME-Sender: X-Sasl-enc: rRkS9dSZipPRPIgg3Jvp9DQfEV/+6o7jVizw9t90eiZ8 1501021276 Received: from xps.domain.com (bzq-164-168-31-206.red.bezeqint.net [31.168.164.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 9077D243A7; Tue, 25 Jul 2017 18:21:16 -0400 (EDT) From: Thomas Monjalon To: keith.wiles@intel.com Cc: dev@dpdk.org Date: Wed, 26 Jul 2017 01:21:02 +0300 Message-Id: <20170725222107.23203-2-thomas@monjalon.net> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170725222107.23203-1-thomas@monjalon.net> References: <20170725222107.23203-1-thomas@monjalon.net> Subject: [dpdk-dev] [pktgen PATCH 1/6] remove unused functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" clang compilations stops on unused static functions. Some are removed, other one is commented out, according to the context. Signed-off-by: Thomas Monjalon --- app/lpktgenlib.c | 12 ++---------- lib/common/l2p.c | 34 ---------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/app/lpktgenlib.c b/app/lpktgenlib.c index dccf3cd..bd1dff3 100644 --- a/app/lpktgenlib.c +++ b/app/lpktgenlib.c @@ -82,6 +82,7 @@ setf_integer(lua_State *L, const char *name, lua_Integer value) lua_setfield(L, -2, name); } +#if 0 /* not used */ /**************************************************************************//** * * setf_integer - Helper routine to set Lua variables. @@ -100,6 +101,7 @@ setf_function(lua_State *L, const char *name, lua_CFunction fn) lua_pushcclosure(L, fn, 0); lua_setfield(L, -2, name); } +#endif /**************************************************************************//** * @@ -207,16 +209,6 @@ getf_string(lua_State *L, const char *field) return value; } -static inline void -parse_portlist(const char *buf, void *pl) -{ -#if (RTE_VERSION >= RTE_VERSION_NUM(2, 0, 0, 0)) - rte_parse_portlist((char *)(uintptr_t)buf, pl); -#else - cmdline_parse_portlist(NULL, buf, pl, PORTLIST_TOKEN_SIZE); -#endif -} - /**************************************************************************//** * * pktgen_set - Set a number of Pktgen values. diff --git a/lib/common/l2p.c b/lib/common/l2p.c index 45ac363..3783236 100644 --- a/lib/common/l2p.c +++ b/lib/common/l2p.c @@ -79,14 +79,6 @@ typedef struct lcore_port_s { static lp_t lp_data, *lp = &lp_data; -static inline uint8_t -_bget(uint8_t *p, uint16_t idx) -{ - int32_t c = (idx / 8); - - return p[c] & (1 << (idx - (c * 8))); -} - static inline int _btst(uint8_t *p, uint16_t idx) { @@ -279,32 +271,6 @@ pg_parse_port_list(char *list, ps_t *ps) return 0; } -static inline void -pg_dump_lcore_map(const char *t, uint8_t *m) -{ - int i; - - fprintf(stderr, "%s( ", t); - - for (i = 0; i < RTE_MAX_LCORE; i++) - if (_btst(m, i) ) - fprintf(stderr, "%d ", i); - fprintf(stderr, ")"); -} - -static inline void -pg_dump_port_map(const char *t, uint8_t *m) -{ - int i; - - fprintf(stderr, "%s( ", t); - - for (i = 0; i < RTE_MAX_ETHPORTS; i++) - if (_btst(m, i) ) - fprintf(stderr, "%d ", i); - fprintf(stderr, ")"); -} - /**************************************************************************//** * * pg_parse_matrix - Parse the command line argument for port configuration