On Fri, 07 Nov 2025 09:38:36 +0000,
Vincent Donnefort <[email protected]> wrote:
>
[...]
> +int __pkvm_reset_tracing(unsigned int cpu)
> +{
> + int ret = 0;
> +
> + if (cpu >= hyp_nr_cpus)
> + return -EINVAL;
> +
> + hyp_spin_lock(&trace_buffer.lock);
> +
> + if (hyp_trace_buffer_loaded(&trace_buffer))
> + ret =
> simple_ring_buffer_reset(per_cpu_ptr(trace_buffer.simple_rbs, cpu));
> + else
> + ret = -ENODEV;
> +
> + hyp_spin_unlock(&trace_buffer.lock);
> +
> + return ret;
nit; there is no case where the 'ret' default value can be used.
Either drop the init or make it so that the default value is
meaningful (-ENODEV).
Thanks,
M.
--
Jazz isn't dead. It just smells funny.