提交 30d5278a 编写于 作者: N Nick Desaulniers 提交者: Zheng Zengkai

ANDROID: vendor_hooks: fix __section macro

aosp inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4RCS8
CVE: NA

Reference: https://android.googlesource.com/kernel/common/+/4cc2f83c77aa

---------------------------

After upstream 33def849 ("treewide: Convert macro and uses of
__section(foo) to __section("foo")"), the preprocessor macro __section
now requires the section name to be double quoted.

This patch resolves breakage that results from merging down from
mainline in this out of tree header.

Fixes: 33def849 ("treewide: Convert macro and uses of __section(foo) to __section("foo")")
Signed-off-by: NNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie6a701251e6420e63187a466b43ec2c834e0ec2e
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 92177b1b
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
#define DEFINE_HOOK_FN(_name, _reg, _unreg, proto, args) \ #define DEFINE_HOOK_FN(_name, _reg, _unreg, proto, args) \
static const char __tpstrtab_##_name[] \ static const char __tpstrtab_##_name[] \
__section(__tracepoints_strings) = #_name; \ __section("__tracepoints_strings") = #_name; \
extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \ extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \
int __traceiter_##_name(void *__data, proto); \ int __traceiter_##_name(void *__data, proto); \
struct tracepoint __tracepoint_##_name __used \ struct tracepoint __tracepoint_##_name __used \
__section(__tracepoints) = { \ __section("__tracepoints") = { \
.name = __tpstrtab_##_name, \ .name = __tpstrtab_##_name, \
.key = STATIC_KEY_INIT_FALSE, \ .key = STATIC_KEY_INIT_FALSE, \
.static_call_key = &STATIC_CALL_KEY(tp_func_##_name), \ .static_call_key = &STATIC_CALL_KEY(tp_func_##_name), \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册