On 14.06.2023 20:02, Jason Andryuk wrote:
> +static void cppc_set_func(int argc, char *argv[])
> +{
> + xc_set_cppc_para_t set_cppc = {};
> + int cpuid = -1;
> + int i = 0;
While cpuid needs to remain of signed type, i wants to be unsigned int.
> + if ( parse_cppc_opts(&set_cppc, &cpuid, argc, argv) )
> + exit(EINVAL);
> +
> + if ( cpuid != -1 )
> + {
> + i = cpuid;
> + max_cpu_nr = i + 1;
While it looks like (ab)using the global variable this way is okay for
now, I'd prefer if you added a local variable instead, such that the
global can retain its meaning. Then
Acked-by: Jan Beulich <[email protected]>
Jan