perf tools: Use __maybe_unused consistently
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 0353631aa73e5e468fae1cd699bf860b59ba100d Gitweb: http://git.kernel.org/tip/0353631aa73e5e468fae1cd699bf860b59ba100d Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 16 Jun 2017 12:18:27 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 19 Jun 2017 15:27:06 -0300
perf tools: Use __maybe_unused consistently
Instead of defining __unused or redefining __maybe_unused.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/bench/numa.c | 2 +- tools/perf/jvmti/jvmti_agent.h | 2 -- tools/perf/jvmti/libjvmti.c | 5 +++-- tools/perf/pmu-events/jevents.c | 4 ---- tools/perf/util/evsel.c | 3 ++- tools/perf/util/header.c | 3 ++- 6 files changed, 8 insertions(+), 11 deletions(-)
tools/perf/bench/numa.c +1 -1
@@ -700,7 +700,7 @@ static inline uint32_t lfsr_32(uint32_t lfsr)* kernel (KSM, zero page, etc.) cannot optimize away RAM * accesses: */ -static inline u64 access_data (u64 *data __attribute__((unused)),u64 val) +static inline u64 access_data (u64 *data,u64 val) {if (g->p.data_reads) val += *data;
tools/perf/jvmti/jvmti_agent.h +0 -2
@@ -5,8 +5,6 @@#include <stdint.h> #include <jvmti.h> -#define __unused __attribute__((unused)) -#if defined(__cplusplus)extern "C" {#endif
tools/perf/jvmti/libjvmti.c +3 -2
@@ -1,3 +1,4 @@ +#include <linux/compiler.h> #include <sys/types.h> #include <stdio.h> #include <string.h>
@@ -238,7 +239,7 @@ code_generated_cb(jvmtiEnv *jvmti, } JNIEXPORT jint JNICALL -Agent_OnLoad(JavaVM *jvm, char *options, void *reserved __unused) +Agent_OnLoad (JavaVM *jvm,char *options,void *reserved__maybe_unused ) {jvmtiEventCallbacks cb;jvmtiCapabilities caps1;
@@ -313,7 +314,7 @@ Agent_OnLoad(JavaVM *jvm, char *options, void *reserved __unused) } JNIEXPORT void JNICALL -Agent_OnUnload(JavaVM *jvm __unused) +Agent_OnUnload (JavaVM *jvm__maybe_unused ) {int ret;
tools/perf/pmu-events/jevents.c +0 -4
@@ -48,10 +48,6 @@#include "json.h" #include "jevents.h" -#ifndef __maybe_unused -#define __maybe_unused __attribute__((unused)) -#endif -int verbose;char *prog;
tools/perf/util/evsel.c +2 -1
@@ -15,6 +15,7 @@#include <traceevent/event-parse.h> #include <linux/hw_breakpoint.h> #include <linux/perf_event.h> +#include <linux/compiler.h> #include <linux/err.h> #include <sys/ioctl.h> #include <sys/resource.h>
@@ -1441,7 +1442,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, }static int __open_attr__fprintf (FILE *fp,const char *name,const char *val, -void *priv __attribute__((unused))) +void *priv__maybe_unused ) {return fprintf (fp," %-32s %s\n" , name, val); }
tools/perf/util/header.c +2 -1
@@ -8,6 +8,7 @@#include <unistd.h> #include <stdio.h> #include <stdlib.h> +#include <linux/compiler.h> #include <linux/list.h> #include <linux/kernel.h> #include <linux/bitops.h>
@@ -1274,7 +1275,7 @@ error: }static int __desc_attr__fprintf (FILE *fp,const char *name,const char *val, -void *priv __attribute__((unused))) +void *priv__maybe_unused ) {return fprintf (fp,", %s = %s" , name, val); }