Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d979494 authored by Olof Johansson's avatar Olof Johansson Committed by Suren Baghdasaryan
Browse files

UPSTREAM: kernel/sched/psi.c: simplify cgroup_move_task()

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]

Link: http://lkml.kernel.org/r/20181103183339.8669-1-olof@lixom.net


Fixes: 2ce7135adc9ad ("psi: cgroup support")
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit 8fcb2312d1e3300e81aa871aad00d4c038cfc184)

Bug: 111308141
Test: modified lmkd to use PSI and tested using lmkd_unit_test

Change-Id: I9cf5220a1dc86b2e4c166722560d9a4a33c3086b
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent e868a99c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment