Soft Patch Panel
 help / color / mirror / Atom feed
From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 12/13] shared/sec: remove local funcs from header
Date: Mon, 24 Jun 2019 13:36:12 +0900	[thread overview]
Message-ID: <20190624043613.19271-13-yasufum.o@gmail.com> (raw)
In-Reply-To: <20190624043613.19271-1-yasufum.o@gmail.com>

From: Yasufumi Ogawa <yasufum.o@gmail.com>

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 <yasufum.o@gmail.com>
---
 .../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


  parent reply	other threads:[~2019-06-24  4:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  4:36 [spp] [PATCH 00/13] Move JSON utils from libs for running cmds yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 01/13] shared/sec: rename ops for setup cmd response yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 02/13] shared/sec: rename functions for spp_mirror yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 03/13] shared/sec: move principle JSON formatter funcs yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 04/13] shared/sec: change order of args of JSON fmtters yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 05/13] shared/sec: move JSON formatter to shard/secondary yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 06/13] shared/sec: revise including headers yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 07/13] shared/sec: move JSON formatters from cmd_runner yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 08/13] shared/sec: move rest of JSON formatters yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 09/13] shared/sec: move lcore funcs in response_info_list yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 10/13] shared/sec: move ope cli-id " yasufum.o
2019-06-24  4:36 ` [spp] [PATCH 11/13] shared/sec: move rest of ops " yasufum.o
2019-06-24  4:36 ` yasufum.o [this message]
2019-06-24  4:36 ` [spp] [PATCH 13/13] shared/sec: refactor comments for JSON formatter yasufum.o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190624043613.19271-13-yasufum.o@gmail.com \
    --to=yasufum.o@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).