From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D6CE7A046B for ; Mon, 24 Jun 2019 06:37:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF5DC1BF40; Mon, 24 Jun 2019 06:37:01 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 34C931BF60 for ; Mon, 24 Jun 2019 06:37:00 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id z75so3795212pgz.5 for ; Sun, 23 Jun 2019 21:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=Cq9casTzz1rcFk6wRc3EK2mvT13LVvqwAID52zxYXhQ=; b=oymatwHNa5RybesXYVU4M6pOTn+YmVeFFS9pDqX3/4gxEFt6maVJqrHH9ge4jjgRzq 8Bf9HB4jcyWx0gbcYo2jKDY57NXaNzvoD04Nu5GLWEM4pdTAjEsc0jDY0bWOB2KqaIFc 0zvqzenIdhNhNyQUfRo6dhAozMPV/v2UxfTeaGpPCMO+F7dXFUKzoXOyvPbi8v8rkCUb Bl0GipVS5UPNz3WAglGzpusbpuXohPLF5nKsaIa2MhJf6fA763lf2SNyJ7v6eWxoUShh ObD56fw/HW2wCpueZf8ijEvSuc9EQ5qSATTFe0dXTZFrKB1dMzGaDkXT6irz9znp8Hhe F4Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Cq9casTzz1rcFk6wRc3EK2mvT13LVvqwAID52zxYXhQ=; b=YfyUAkIbO0ZF40CcAKcY6BGcp+S1QyElWkjSgJqs6FExCzfnxYqsDDGD2M9luTHYIm n8rCuZvpXCi1tso1Av5tDICURyp3UF5QPnfrkszIip2zeYQCnT1UbKupk2hZWKjRssEw cXw7pWQ/IgxyH6EXENTjG4ZKL+rg7ENLFhrqDKauToCUMqNec5uAGOdiu3KYSg7Mc7Zm KD6AqAl3lY2KtJttVzTAKn09Khp9fi+HP3NiWwoeiDbm6HMfW3ECIQArdg25T33m1aOe vbeyUb7WQFZ1xr2nWt9g+1Og1fN5LyeWS5ISeKClnHossnnjsQ+7a6pvA1K1f3Vw/HWk 3Igw== X-Gm-Message-State: APjAAAXQRqCceTgQ0/Tuk6INzcb1N63nhe3yqIDv4muDRA3PZFqVHm25 rWjQPRhcGQl0gynRDiGo0FZSO56K X-Google-Smtp-Source: APXvYqzNXW/t3Uwcvi8gNBcA7LSnO+9A5tVbxx29VWr03MWfYkp4apbdMPVu9CN8GXgty5DhWJydPg== X-Received: by 2002:a17:90a:a09:: with SMTP id o9mr22364694pjo.95.1561351019349; Sun, 23 Jun 2019 21:36:59 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id c10sm9005178pjq.14.2019.06.23.21.36.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jun 2019 21:36:59 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 24 Jun 2019 13:36:12 +0900 Message-Id: <20190624043613.19271-13-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190624043613.19271-1-yasufum.o@gmail.com> References: <20190624043613.19271-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 12/13] shared/sec: remove local funcs from header X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa Some of functions start with `add_` defined in `cmd_res_formatter.h` are not used from outside. This update is to remove these functions from header file without add_client_id() and add_classifier_table(). Signed-off-by: Yasufumi Ogawa --- .../spp_worker_th/cmd_res_formatter.c | 21 ++++++++++++++----- .../spp_worker_th/cmd_res_formatter.h | 13 ------------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_res_formatter.c b/src/shared/secondary/spp_worker_th/cmd_res_formatter.c index ab08fcd..24b5608 100644 --- a/src/shared/secondary/spp_worker_th/cmd_res_formatter.c +++ b/src/shared/secondary/spp_worker_th/cmd_res_formatter.c @@ -10,6 +10,17 @@ #define RTE_LOGTYPE_WK_CMD_RES_FMT RTE_LOGTYPE_USER1 +/* Proto type declaration for a list of operator functions. */ +static int append_result_value(const char *name, char **output, void *tmp); +static int append_error_details_value(const char *name, char **output, + void *tmp); +static int add_interface(const char *name, char **output, + void *tmp __attribute__ ((unused))); +static int add_master_lcore(const char *name, char **output, + void *tmp __attribute__ ((unused))); +static int add_core(const char *name, char **output, + void *tmp __attribute__ ((unused))); + /** * List of worker process type. The order of items should be same as the order * of enum `secondary_type` in cmd_utils.h. @@ -78,7 +89,7 @@ struct cmd_response response_info_list[] = { }; /* append a command result for JSON format */ -int +static int append_result_value(const char *name, char **output, void *tmp) { const struct cmd_result *result = tmp; @@ -86,7 +97,7 @@ append_result_value(const char *name, char **output, void *tmp) } /* append error details for JSON format */ -int +static int append_error_details_value(const char *name, char **output, void *tmp) { int ret = SPP_RET_NG; @@ -672,7 +683,7 @@ add_client_id(const char *name, char **output, } /* Add entry of port to a response in JSON such as "phy:0". */ -int +static int add_interface(const char *name, char **output, void *tmp __attribute__ ((unused))) { @@ -706,7 +717,7 @@ add_interface(const char *name, char **output, } /* Add entry of master lcore to a response in JSON. */ -int +static int add_master_lcore(const char *name, char **output, void *tmp __attribute__ ((unused))) { @@ -716,7 +727,7 @@ add_master_lcore(const char *name, char **output, } /* Add entry of core info of worker to a response in JSON such as "core:0". */ -int +static int add_core(const char *name, char **output, void *tmp __attribute__ ((unused))) { diff --git a/src/shared/secondary/spp_worker_th/cmd_res_formatter.h b/src/shared/secondary/spp_worker_th/cmd_res_formatter.h index d9481e3..cf5f81b 100644 --- a/src/shared/secondary/spp_worker_th/cmd_res_formatter.h +++ b/src/shared/secondary/spp_worker_th/cmd_res_formatter.h @@ -32,10 +32,6 @@ struct cmd_response { int (*func)(const char *name, char **output, void *tmp); }; -int append_result_value(const char *name, char **output, void *tmp); - -int append_error_details_value(const char *name, char **output, void *tmp); - int append_interface_array(char **output, const enum port_type type); int append_process_type_value(const char *name, char **output, @@ -82,15 +78,6 @@ int append_info_value(const char *name, char **output); int add_client_id(const char *name, char **output, void *tmp __attribute__ ((unused))); -int add_interface(const char *name, char **output, - void *tmp __attribute__ ((unused))); - -int add_master_lcore(const char *name, char **output, - void *tmp __attribute__ ((unused))); - -int add_core(const char *name, char **output, - void *tmp __attribute__ ((unused))); - int add_classifier_table(const char *name, char **output, void *tmp __attribute__ ((unused))); #endif -- 2.17.1