lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1342889135-14825-4-git-send-email-namhyung@kernel.org>
Date:	Sun, 22 Jul 2012 01:45:34 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: [PATCH 4/5] perf header: Remove unused @fd arg from ->print callback

As we don't need the @fd in the ->print any more, get rid of it from
the signature.

Cc: Stephane Eranian <eranian@...gle.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
 tools/perf/util/header.c |   31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 9ab1803d601d..4484a80c20ba 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -973,38 +973,38 @@ static int write_branch_stack(int fd __used, struct perf_header *h __used,
 	return 0;
 }
 
-static void print_hostname(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_hostname(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# hostname : %s\n", ph->hostname);
 }
 
-static void print_osrelease(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_osrelease(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# os release : %s\n", ph->os_release);
 }
 
-static void print_arch(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_arch(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# arch : %s\n", ph->arch);
 }
 
-static void print_cpudesc(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_cpudesc(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# cpudesc : %s\n", ph->cpu_desc);
 }
 
-static void print_nrcpus(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_nrcpus(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# nrcpus online : %u\n", ph->nr_cpus_online);
 	fprintf(fp, "# nrcpus avail : %u\n", ph->nr_cpus_avail);
 }
 
-static void print_version(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_version(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# perf version : %s\n", ph->version);
 }
 
-static void print_cmdline(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_cmdline(struct perf_header *ph, FILE *fp)
 {
 	char *str;
 	int i;
@@ -1023,7 +1023,7 @@ static void print_cmdline(struct perf_header *ph, int fd __used, FILE *fp)
 #define TOPO_STR_DELIM ':'
 
 /* For string formatting, see process_cpu_topology() */
-static void print_cpu_topology(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_cpu_topology(struct perf_header *ph, FILE *fp)
 {
 	u32 nr, i;
 	char *str;
@@ -1074,7 +1074,7 @@ static void print_cpu_topology(struct perf_header *ph, int fd __used, FILE *fp)
 	}
 }
 
-static void print_event_desc(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_event_desc(struct perf_header *ph, FILE *fp)
 {
 	struct perf_session *session;
 	struct perf_evsel *evsel;
@@ -1113,13 +1113,13 @@ static void print_event_desc(struct perf_header *ph, int fd __used, FILE *fp)
 	}
 }
 
-static void print_total_mem(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_total_mem(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# total memory : %"PRIu64" kB\n", ph->total_mem);
 }
 
 /* For string formatting, see process_numa_topology() */
-static void print_numa_topology(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_numa_topology(struct perf_header *ph, FILE *fp)
 {
 	u32 nr, i, node;
 	u64 mem_total, mem_free;
@@ -1165,13 +1165,12 @@ static void print_numa_topology(struct perf_header *ph, int fd __used, FILE *fp)
 	}
 }
 
-static void print_cpuid(struct perf_header *ph, int fd __used, FILE *fp)
+static void print_cpuid(struct perf_header *ph, FILE *fp)
 {
 	fprintf(fp, "# cpuid : %s\n", ph->cpuid);
 }
 
-static void print_branch_stack(struct perf_header *ph __used, int fd __used,
-			       FILE *fp)
+static void print_branch_stack(struct perf_header *ph __used, FILE *fp)
 {
 	fprintf(fp, "# contains samples with branch stack\n");
 }
@@ -1684,7 +1683,7 @@ static int process_total_mem(struct perf_file_section *section __used,
 
 struct feature_ops {
 	int (*write)(int fd, struct perf_header *h, struct perf_evlist *evlist);
-	void (*print)(struct perf_header *h, int fd, FILE *fp);
+	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);
 	const char *name;
@@ -1746,7 +1745,7 @@ static int perf_file_section__fprintf_info(struct perf_file_section *section,
 		return 0;
 
 	if (!feat_ops[feat].full_only || hd->full)
-		feat_ops[feat].print(ph, fd, hd->fp);
+		feat_ops[feat].print(ph, hd->fp);
 	else
 		fprintf(hd->fp, "# %s info available, use -I to display\n",
 			feat_ops[feat].name);
-- 
1.7.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ