]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals
authorJosh Cartwright <josh.cartwright@ni.com>
Wed, 28 Jan 2015 19:08:45 +0000 (13:08 -0600)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:41 +0000 (09:47 +0200)
commitaf8ad7e90234d23bbd151eef5827394a95290b6a
tree09403becc224ebd49240bc91576a87a9c05b1555
parente8054980dfae23495d8f63a6ebcfc35363376274
lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals

"lockdep: Selftest: Only do hardirq context test for raw spinlock"
disabled the execution of certain tests with PREEMPT_RT_FULL, but did
not prevent the tests from still being defined.  This leads to warnings
like:

  ./linux/lib/locking-selftest.c:574:1: warning: 'irqsafe1_hard_rlock_12' defined but not used [-Wunused-function]
  ./linux/lib/locking-selftest.c:574:1: warning: 'irqsafe1_hard_rlock_21' defined but not used [-Wunused-function]
  ./linux/lib/locking-selftest.c:577:1: warning: 'irqsafe1_hard_wlock_12' defined but not used [-Wunused-function]
  ./linux/lib/locking-selftest.c:577:1: warning: 'irqsafe1_hard_wlock_21' defined but not used [-Wunused-function]
  ./linux/lib/locking-selftest.c:580:1: warning: 'irqsafe1_soft_spin_12' defined but not used [-Wunused-function]
  ...

Fixed by wrapping the test definitions in #ifndef CONFIG_PREEMPT_RT_FULL
conditionals.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Signed-off-by: Xander Huff <xander.huff@ni.com>
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
lib/locking-selftest.c