]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Fix compiler warnings
authorGuenter Roeck <linux@roeck-us.net>
Wed, 25 Jun 2014 01:05:29 +0000 (18:05 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 2 Jul 2014 06:33:48 +0000 (08:33 +0200)
commiteda680dd9484bf993e88c3a1fcafa7aa4cddd61f
tree0230fe7f1b774d6ae7946c73fbe959a46ba89299
parentd4f9c701a322ea8b7d1e86580905aec1b033a327
sched: Fix compiler warnings

Commit b00145e75e (sched: Rework sched_domain topology definition)
introduced a number of functions with a return value of 'const int'.
gcc doesn't know what to do with that and, if the kernel is compiled
with W=1, complains with the following warnings whenever sched.h
is included.

  include/linux/sched.h:875:25: warning: type qualifiers ignored on function return type
  include/linux/sched.h:882:25: warning: type qualifiers ignored on function return type
  include/linux/sched.h:889:25: warning: type qualifiers ignored on function return type
  include/linux/sched.h:1002:21: warning: type qualifiers ignored on function return type

Commits 2b561010 (sched, ARM: Create a dedicated scheduler topology table)
and 88bdf941d (sched, powerpc: Create a dedicated topology table) introduce
the same warning in the arm and powerpc code.

Drop 'const' from the function declarations to fix the problem.

The fix for all three patches has to be applied together to avoid
compilation failures for the affected architectures.

Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1403658329-13196-1-git-send-email-linux@roeck-us.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm/kernel/topology.c
arch/powerpc/kernel/smp.c
include/linux/sched.h