aliyun / plugsched

Live upgrade Linux kernel scheduler subsystem
BSD 3-Clause "New" or "Revised" License
82 stars 23 forks source link

border: delete __init function in unused macro branches to improve re… #132

Closed chenshanpei closed 2 years ago

chenshanpei commented 2 years ago

…adability

Some __init functions are configured by the CONFIG_XXX, for the fallowing example:

ifdef CONFIG_SMP

void __init sched_init_smp(void) --> A { }

else

void __init sched_init_smp(void) --> B { }

endif

If CONFIG_SMP is enabled, only the first line of function B is deleted, which is unfriendly to understanding code. This patch merges the whole function into one line firstly, then delete it.

Signed-off-by: Shanpei Chen shanpeic@linux.alibaba.com

anolis-bot commented 2 years ago

@chenshanpei , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/2r1b4c7z/test_result/18778

anolis-bot commented 2 years ago

@chenshanpei , The CI test is completed, please check result:

Test CaseTest Result
schedule_testx86_64:white_check_mark: SUCCESS
public_var_test:white_check_mark: SUCCESS
var_uniformity_test:white_check_mark: SUCCESS
cpu_throttle_test:white_check_mark: SUCCESS
domain_rebuild_test:white_check_mark: SUCCESS
sched_syscall_test:white_check_mark: SUCCESS
mem_pressure_test:white_check_mark: SUCCESS
schedule_testaarch64:white_check_mark: SUCCESS

Congratulations, your test job passed!

ampresent commented 2 years ago

LGTM