[PATCH v2 3/6] selftests/resctrl: Refactor the initialization of IMC's perf_event_attr using linked list

Reinette Chatre reinette.chatre at intel.com
Wed Apr 22 09:05:08 PDT 2026


Hi Yifan,

On 4/10/26 2:33 AM, Yifan Wu wrote:
> @@ -292,15 +290,17 @@ static int num_of_imcs(void)
>  
>  int initialize_read_mem_bw_imc(void)
>  {
> -	int imc;
> +	struct imc_counter_config *imc_counter;
> +	int ret;
>  
> -	imcs = num_of_imcs();
> -	if (imcs <= 0)
> -		return imcs;
> +	ret = num_of_imcs();
> +	if (ret < 0)
> +		return ret;

I see this change from "imcs" to "ret" as a consequence of the semantic change
to num_of_imcs() done in previous patch. Please move this change to be
located with the semantic change that will make that switch easier to understand.

Reinette



More information about the linux-arm-kernel mailing list