[PATCH 05/30] perf config: Use pr_warning()

From: Arnaldo Carvalho de Melo
Date: Fri Jun 30 2017 - 18:25:54 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

warning() is going away, consolidating error reporting.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-5r3636cwl4z1varo90mervai@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/config.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 8d724f0fa5a8..1498f38ea7ad 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -657,8 +657,7 @@ static int perf_config_set__init(struct perf_config_set *set)

user_config = strdup(mkpath("%s/.perfconfig", home));
if (user_config == NULL) {
- warning("Not enough memory to process %s/.perfconfig, "
- "ignoring it.", home);
+ pr_warning("Not enough memory to process %s/.perfconfig, ignoring it.", home);
goto out;
}

@@ -671,8 +670,7 @@ static int perf_config_set__init(struct perf_config_set *set)
ret = 0;

if (st.st_uid && (st.st_uid != geteuid())) {
- warning("File %s not owned by current user or root, "
- "ignoring it.", user_config);
+ pr_warning("File %s not owned by current user or root, ignoring it.", user_config);
goto out_free;
}

--
2.9.4