Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
Arnd Bergmann 975db45e9c locking/static_keys: Avoid nested functions
clang does not support nested functions inside of an array definition:

  lib/test_static_keys.c:105:16: error: function definition is not allowed here
                          .test_key       = test_key_func(&old_true_key, static_key_true),
  lib/test_static_keys.c:50:20: note: expanded from macro 'test_key_func'
          ({bool func(void) { return branch(key); } func; })

That code appears to be a little too clever, so this simplifies it
a bit by defining functions outside of the array.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jason Baron <jbaron@akamai.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1454942223-2781480-1-git-send-email-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-02-09 10:27:29 +01:00
kbuild test robot 20f9ed1568 locking/static_keys: Make verify_keys() static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150803184748.GA80634@lkp-ib04
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-05 09:53:40 +02:00
Ingo Molnar 2bf9e0ab08 locking/static_keys: Provide a selftest
The 'jump label' self-test is in reality testing static keys - rename things
accordingly.

Also prettify the code in various places while at it.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: benh@kernel.crashing.org
Cc: bp@alien8.de
Cc: davem@davemloft.net
Cc: ddaney@caviumnetworks.com
Cc: heiko.carstens@de.ibm.com
Cc: linux-kernel@vger.kernel.org
Cc: liuj97@gmail.com
Cc: luto@amacapital.net
Cc: michael@ellerman.id.au
Cc: rabin@rab.in
Cc: ralf@linux-mips.org
Cc: rostedt@goodmis.org
Cc: vbabka@suse.cz
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/0c091ecebd78a879ed8a71835d205a691a75ab4e.1438227999.git.jbaron@akamai.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-03 11:51:12 +02:00