linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 5/5] perf header: Remove unused @feat arg from ->process callback
Date: Sun, 22 Jul 2012 01:45:35 +0900	[thread overview]
Message-ID: <1342889135-14825-5-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1342889135-14825-1-git-send-email-namhyung@kernel.org>

As the @feat arg is not used anywhere, get rid of it from the signature.

Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/header.c |   48 ++++++++++++++++++----------------------------
 1 file changed, 19 insertions(+), 29 deletions(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 4484a80c20ba..0efbaa3c5a6b 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1325,17 +1325,16 @@ out:
 	return err;
 }
 
-static int process_tracing_data(struct perf_file_section *section __unused,
-			      struct perf_header *ph __unused,
-			      int feat __unused, int fd, void *data)
+static int process_tracing_data(struct perf_file_section *section __used,
+				struct perf_header *ph __used, int fd,
+				void *data)
 {
 	trace_report(fd, data, false);
 	return 0;
 }
 
 static int process_build_id(struct perf_file_section *section,
-			    struct perf_header *ph,
-			    int feat __unused, int fd, void *data __used)
+			    struct perf_header *ph, int fd, void *data __used)
 {
 	if (perf_header__read_build_ids(ph, fd, section->offset, section->size))
 		pr_debug("Failed to read buildids, continuing...\n");
@@ -1343,16 +1342,14 @@ static int process_build_id(struct perf_file_section *section,
 }
 
 static int process_hostname(struct perf_file_section *section __used,
-			    struct perf_header *ph, int feat __used, int fd,
-			    void *data __used)
+			    struct perf_header *ph, int fd, void *data __used)
 {
 	ph->hostname = do_read_string(fd, ph);
 	return ph->hostname ? 0 : -ENOMEM;
 }
 
 static int process_osrelease(struct perf_file_section *section __used,
-			     struct perf_header *ph, int feat __used, int fd,
-			     void *data __used)
+			     struct perf_header *ph, int fd, void *data __used)
 {
 
 	ph->os_release = do_read_string(fd, ph);
@@ -1360,24 +1357,21 @@ static int process_osrelease(struct perf_file_section *section __used,
 }
 
 static int process_arch(struct perf_file_section *section __used,
-			struct perf_header *ph, int feat __used, int fd,
-			void *data __used)
+			struct perf_header *ph, int fd, void *data __used)
 {
 	ph->arch = do_read_string(fd, ph);
 	return ph->arch ? 0 : -ENOMEM;
 }
 
 static int process_cpudesc(struct perf_file_section *section __used,
-			   struct perf_header *ph, int feat __used, int fd,
-			   void *data __used)
+			   struct perf_header *ph, int fd, void *data __used)
 {
 	ph->cpu_desc = do_read_string(fd, ph);
 	return ph->cpu_desc ? 0 : -ENOMEM;
 }
 
 static int process_nrcpus(struct perf_file_section *section __used,
-			  struct perf_header *ph, int feat __used, int fd,
-			  void *data __used)
+			  struct perf_header *ph, int fd, void *data __used)
 {
 	ssize_t ret;
 	u32 nr;
@@ -1404,8 +1398,7 @@ static int process_nrcpus(struct perf_file_section *section __used,
 }
 
 static int process_version(struct perf_file_section *section __used,
-			   struct perf_header *ph, int feat __used, int fd,
-			   void *data __used)
+			   struct perf_header *ph, int fd, void *data __used)
 {
 	ph->version = do_read_string(fd, ph);
 	return ph->version ? 0 : -ENOMEM;
@@ -1413,8 +1406,7 @@ static int process_version(struct perf_file_section *section __used,
 
 /* Each argv would be separated by a NULL character */
 static int process_cmdline(struct perf_file_section *section __used,
-			   struct perf_header *ph, int feat __used, int fd,
-			   void *data __used)
+			   struct perf_header *ph, int fd, void *data __used)
 {
 	ssize_t ret;
 	char *str, *tmp;
@@ -1476,8 +1468,8 @@ error:
  *	"NR_THREAD_SIBLINGS(M):SIBLING[0]:SIBLING[1]:...:SIBLING[M-1]\n"
  */
 static int process_cpu_topology(struct perf_file_section *section __used,
-				struct perf_header *ph, int feat __used,
-				int fd,	void *data __used)
+				struct perf_header *ph, int fd,
+				void *data __used)
 {
 	ssize_t ret;
 	u32 nr, i;
@@ -1566,8 +1558,8 @@ error:
  *	"NODE_NUM(N-1):MEM_TOTAL:MEM_FREE:CPULIST\n"
  */
 static int process_numa_topology(struct perf_file_section *section __used,
-				 struct perf_header *ph, int feat __used,
-				 int fd, void *data __used)
+				 struct perf_header *ph, int fd,
+				 void *data __used)
 {
 	ssize_t ret;
 	u32 nr, node, i;
@@ -1656,16 +1648,14 @@ error:
 }
 
 static int process_cpuid(struct perf_file_section *section __used,
-			 struct perf_header *ph, int feat __used, int fd,
-			 void *data __used)
+			 struct perf_header *ph, int fd, void *data __used)
 {
 	ph->cpuid = do_read_string(fd, ph);
 	return ph->cpuid ? 0 : -ENOMEM;
 }
 
 static int process_total_mem(struct perf_file_section *section __used,
-			     struct perf_header *ph, int feat __used, int fd,
-			     void *data __used)
+			     struct perf_header *ph, int fd, void *data __used)
 {
 	uint64_t mem;
 	ssize_t ret;
@@ -1685,7 +1675,7 @@ struct feature_ops {
 	int (*write)(int fd, struct perf_header *h, struct perf_evlist *evlist);
 	void (*print)(struct perf_header *h, FILE *fp);
 	int (*process)(struct perf_file_section *section,
-		       struct perf_header *h, int feat, int fd, void *data);
+		       struct perf_header *h, int fd, void *data);
 	const char *name;
 	bool full_only;
 };
@@ -2196,7 +2186,7 @@ static int perf_file_section__process(struct perf_file_section *section,
 	if (!feat_ops[feat].process)
 		return 0;
 
-	return feat_ops[feat].process(section, ph, feat, fd, data);
+	return feat_ops[feat].process(section, ph, fd, data);
 }
 
 static int perf_file_header__read_pipe(struct perf_pipe_file_header *header,
-- 
1.7.9.2


      parent reply	other threads:[~2012-07-21 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21 16:45 [PATCH 1/5] perf header: Do not write event_desc feature Namhyung Kim
2012-07-21 16:45 ` [PATCH 2/5] perf header: add ->process callbacks to most of features Namhyung Kim
2012-07-21 16:45 ` [PATCH 3/5] perf header: Make feat_ops->print use processed result Namhyung Kim
2012-07-21 16:45 ` [PATCH 4/5] perf header: Remove unused @fd arg from ->print callback Namhyung Kim
2012-07-21 16:45 ` Namhyung Kim [this message]

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=1342889135-14825-5-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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).