perf mmap: Add new return value logic for perf_mmap__read_init()
authorKan Liang <[email protected]>
Thu, 18 Jan 2018 21:26:20 +0000 (13:26 -0800)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 15 Feb 2018 12:52:49 +0000 (09:52 -0300)
commit189f2cc91f9f2efef5d5f4dde43684c01b5f6f2f
treed24142a151f26c2bb5ee24bbe51a355253e73159
parent8872481bd04850b19e053dc579de5a11b83b16fc
perf mmap: Add new return value logic for perf_mmap__read_init()

Improve the readability by using meaningful enum (-EAGAIN, -EINVAL and
0) to replace the three returning states (0, -1 and 1).

Suggested-by: Wang Nan <[email protected]>
Signed-off-by: Kan Liang <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/mmap.c