/* __ftrace_set_clr_event(NULL, NULL, NULL, set) will set/unset all events.  */
static int __ftrace_set_clr_event(const char *match, const char *sub, const char *event, int set)
/* __ftrace_set_clr_event(NULL, NULL, NULL, set) will set/unset all events.  */
static int __ftrace_set_clr_event(const char *match, const char *sub, const char *event, int set)
{
	struct ftrace_event_call *call;
	int ret = -EINVAL;
	mutex_lock(&event_mutex);
	list_for_each_entry(call, &ftrace_events, list) {
		if (!call->name || !call->regfunc)
			continue;
		if (match &&
		    strcmp(match, call->name) != 0 &&
		    strcmp(match, call->system) != 0)
			continue;
		if (sub && strcmp(sub, call->system) != 0)
			continue;
		if (event && strcmp(event, call->name) != 0)
			continue;
		ftrace_event_enable_disable(call, set);
		ret = 0;
	}
	mutex_unlock(&event_mutex);
	return ret;
}