From: Ingo Molnar Date: Mon, 12 Apr 2021 08:27:16 +0000 (+0200) Subject: Merge branch 'locking/core' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5c223a5716d390e1eba98b84fce3a6ec491efe6c;p=users%2Fjedix%2Flinux-maple.git Merge branch 'locking/core' --- 5c223a5716d390e1eba98b84fce3a6ec491efe6c diff --cc include/linux/static_call.h index e01b61ab86b1,8d50f62420ca..fc94faa53b5b --- a/include/linux/static_call.h +++ b/include/linux/static_call.h @@@ -118,13 -113,11 +118,13 @@@ extern void arch_static_call_transform( #define static_call_update(name, func) \ ({ \ - BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \ + typeof(&STATIC_CALL_TRAMP(name)) __F = (func); \ __static_call_update(&STATIC_CALL_KEY(name), \ - STATIC_CALL_TRAMP_ADDR(name), func); \ + STATIC_CALL_TRAMP_ADDR(name), __F); \ }) +#define static_call_query(name) (READ_ONCE(STATIC_CALL_KEY(name).func)) + #ifdef CONFIG_HAVE_STATIC_CALL_INLINE extern int __init static_call_init(void);