Re: [PATCH v3 10/27] perf parse-events: Create two hybrid raw events

From: Jin, Yao
Date: Sun Apr 11 2021 - 21:14:24 EST


Hi Jiri,

On 4/9/2021 9:49 PM, Jiri Olsa wrote:
On Mon, Mar 29, 2021 at 03:00:29PM +0800, Jin Yao wrote:

SNIP

+ name, config_terms, pmu);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
int parse_events__add_numeric_hybrid(struct parse_events_state *parse_state,
struct list_head *list,
struct perf_event_attr *attr,
@@ -91,6 +126,9 @@ int parse_events__add_numeric_hybrid(struct parse_events_state *parse_state,
if (attr->type != PERF_TYPE_RAW) {
return add_hw_hybrid(parse_state, list, attr, name,
config_terms);
+ } else {
+ return add_raw_hybrid(parse_state, list, attr, name,
+ config_terms);
}
return -1;

no need for the return -1

jirka


Yes, no need return -1 here.

if (attr->type != PERF_TYPE_RAW) {
return add_hw_hybrid(parse_state, list, attr, name,
config_terms);
}

return add_raw_hybrid(parse_state, list, attr, name,
config_terms);

Thanks
Jin Yao

--
2.17.1