From cc0684351a0c6efda445225b99ef69a381395cbf Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Sun, 23 Mar 2025 15:51:46 +0700 Subject: [PATCH] kernel: system_work_q: make `k_work_queue_config cfg` as `static const` Make `k_work_queue_config cfg` as `static const` to enable compile-time instantiation instead of runtime allocation. This modification saves substantial flash memory but has system-wide effects that should be considered. Signed-off-by: Pisit Sawangvonganan --- kernel/system_work_q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/system_work_q.c b/kernel/system_work_q.c index 5cc26fd82e1..aa8c3de03ab 100644 --- a/kernel/system_work_q.c +++ b/kernel/system_work_q.c @@ -21,7 +21,7 @@ struct k_work_q k_sys_work_q; static int k_sys_work_q_init(void) { - struct k_work_queue_config cfg = { + static const struct k_work_queue_config cfg = { .name = "sysworkq", .no_yield = IS_ENABLED(CONFIG_SYSTEM_WORKQUEUE_NO_YIELD), .essential = true,