Skip to content
Commit f110e0fe authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Michal Marek
Browse files

kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line



In kernel/cgroup.c there is:

    #define SUBSYS(_x)                                             \
        DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_enabled_key);    \
        DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_on_dfl_key);     \
        EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_enabled_key);         \
        EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_on_dfl_key);

The expansion of this macro causes multiple EXPORT_SYMBOL_GPL() instances
to appear on the same preprocessor line output, confusing the sed script
expecting only one of them per line.  Unfortunately this can't be fixed
nicely in the sed script as sed's regexp can't do non greedy matching.

Fix this by turning any semicolon into a line break before filtering.

Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent e72e2dfe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment