Re: [PATCH v2 1/6] kcov: Use unsigned int for kcov_start() mode parameter

From: Alexander Potapenko

Date: Tue Sep 01 2026 - 10:28:52 EST


On Tue, Aug 11, 2026 at 5:41 PM Karl Mehltretter <kmehltretter@xxxxxxxxx> wrote:
>
> task_struct::kcov_mode usually holds an enum kcov_mode value, but it can
> also carry flag bits such as KCOV_IN_CTXSW, so the field is unsigned int.
>
> kcov_remote_softirq_stop() passes the saved raw value through
> kcov_start()'s enum kcov_mode parameter before kcov_start() stores it
> back into the unsigned int field. The parameter type therefore does not
> match the values it receives.
>
> Type the parameter unsigned int, like the field and the saved copy. No
> functional change.
>
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
Reviewed-by: Alexander Potapenko <glider@xxxxxxxxxx>