lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 1/4] perf tool: Simplify machine__create_modules() a bit
Date
Tweak this function a bit. No need to return twice.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
---
tools/perf/util/machine.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 803c9d1803dd..ab2919bc0a0d 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1613,10 +1613,8 @@ static int machine__create_modules(struct machine *machine)
if (modules__parse(modules, machine, machine__create_module))
return -1;

- if (!machine__set_modules_path(machine))
- return 0;
-
- pr_debug("Problems setting modules path maps, continuing anyway...\n");
+ if (machine__set_modules_path(machine))
+ pr_debug("Problems setting modules path maps, continuing anyway...\n");

return 0;
}
--
2.39.0
\
 
 \ /
  Last update: 2023-03-26 23:34    [W:0.201 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site