nohz: replace dead select with choice default
PATCH 1/1 nohz: replace dead select with choice default
'select' does not work on config options in a 'choice', so currently the 'select VIRT_CPU_ACCOUNTING_GEN' for NO_HZ_FULL is dead, with the choice option VIRT_CPU_ACCOUNTING_GEN only being enabled when NO_HZ_FULL=y because the other choice members depend on NO_HZ_FULL=n.
Let's remove the dead select, and encode this relationship as a default of the choice, instead.
This dead select was found by kconfirm, a static analysis tool for Kconfig.
--- init/Kconfig | 1 + kernel/time/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -0
@@ -565,6 +565,7 @@ config VIRT_CPU_ACCOUNTING choice prompt "Cputime accounting" + default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL default TICK_CPU_ACCOUNTING # Kind of a stub config for the pure tick based cputime accounting
kernel/time/Kconfig +0 -1
@@ -133,7 +133,6 @@ config NO_HZ_FULL depends on HAVE_VIRT_CPU_ACCOUNTING_GEN select NO_HZ_COMMON select RCU_NOCB_CPU - select VIRT_CPU_ACCOUNTING_GEN select IRQ_WORK select CPU_ISOLATION help
Signature · 1 line
2.55.0
Quoted 8 lines · Julian Braha
'select' does not work on config options in a 'choice', so currently the 'select
VIRT_CPU_ACCOUNTING_GEN' forNO_HZ_FULLis dead, with the choice optionVIRT_CPU_ACCOUNTING_GENonly being enabled when NO_HZ_FULL=y because the other choice members depend on NO_HZ_FULL=n.Let's remove the dead select, and encode this relationship as a default of the choice, instead.
Quoted 8 lines
This dead select was found by kconfirm, a static analysis tool for
Kconfig.Signed-off-by Julian Braha <[email protected]>--- init/Kconfig | 1 + kernel/time/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
Thanks!
[tip: timers/core] nohz: Replace dead select with choice default
In reply to Julian BrahaThe following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: b17006b45283f012a6e166517f5ca3e1af2f806a Gitweb: https://git.kernel.org/tip/b17006b45283f012a6e166517f5ca3e1af2f806a Author: Julian Braha <[email protected]> AuthorDate: Sat, 01 Aug 2026 17:01:40 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 11 Aug 2026 15:37:23 +02:00
nohz: Replace dead select with choice default
'select' does not work on config options in a 'choice', so currently the 'select VIRT_CPU_ACCOUNTING_GEN' for NO_HZ_FULL is dead, with the choice option VIRT_CPU_ACCOUNTING_GEN only being enabled when NO_HZ_FULL=y because the other choice members depend on NO_HZ_FULL=n.
Remove the dead select, and encode this relationship as a default of the choice, instead.
This dead select was found by kconfirm, a static analysis tool for Kconfig.
--- init/Kconfig | 1 + kernel/time/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -0
@@ -562,6 +562,7 @@ config VIRT_CPU_ACCOUNTING choice prompt "Cputime accounting" + default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL default TICK_CPU_ACCOUNTING # Kind of a stub config for the pure tick based cputime accounting
kernel/time/Kconfig +0 -1
@@ -133,7 +133,6 @@ config NO_HZ_FULL depends on HAVE_VIRT_CPU_ACCOUNTING_GEN select NO_HZ_COMMON select RCU_NOCB_CPU - select VIRT_CPU_ACCOUNTING_GEN select IRQ_WORK select CPU_ISOLATION help