lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e4842f3-e758-b932-2ce2-fe1c0c891897@linux.intel.com>
Date:   Mon, 12 Apr 2021 09:14:16 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v3 10/27] perf parse-events: Create two hybrid raw events

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
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ