Re: [PATCH] psi: simplify cgroup_move_task

From: Johannes Weiner
Date: Tue Nov 06 2018 - 11:55:09 EST


On Sat, Nov 03, 2018 at 11:33:39AM -0700, Olof Johansson wrote:
> The existing code triggered an invalid warning about 'rq' possibly being
> used uninitialized. Instead of doing the silly warning suppression by
> initializa it to NULL, refactor the code to bail out early instead.
>
> Warning was:
>
> kernel/sched/psi.c: In function âcgroup_move_taskâ:
> kernel/sched/psi.c:639:13: warning: ârqâ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Fixes: 2ce7135adc9ad ("psi: cgroup support")
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Signed-off-by: Olof Johansson <olof@xxxxxxxxx>

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Thanks Olof!