From: Jinchao Wang <hidden> Date: 2025-08-20 09:17:34
This patch updates the fbcon_skip_panic() function to use
the panic_in_progress() helper.
The previous direct access to panic_cpu is less
readable and is being replaced by a dedicated function
that more clearly expresses the intent.
This change is part of a series to refactor the kernel's
panic handling logic for better clarity and robustness.
Signed-off-by: Jinchao Wang <redacted>
---
drivers/video/fbdev/core/fbcon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
@@ -279,14 +279,7 @@ static int fbcon_get_rotate(struct fb_info *info)staticboolfbcon_skip_panic(structfb_info*info){-/* panic_cpu is not exported, and can't be used if built as module. Use-*oops_in_progressinstead,butnon-fataloopswon'tbeprinted.-*/-#if defined(MODULE)-return(info->skip_panic&&unlikely(oops_in_progress));-#else-return(info->skip_panic&&unlikely(atomic_read(&panic_cpu)!=PANIC_CPU_INVALID));-#endif+return(info->skip_panic&&unlikely(panic_in_progress()));}staticinlineboolfbcon_is_active(structvc_data*vc,structfb_info*info)
From: Qianqiang Liu <hidden> Date: 2025-08-20 10:45:45
On Wed, Aug 20, 2025 at 05:14:47PM +0800, Jinchao Wang wrote:
quoted hunk
This patch updates the fbcon_skip_panic() function to use
the panic_in_progress() helper.
The previous direct access to panic_cpu is less
readable and is being replaced by a dedicated function
that more clearly expresses the intent.
This change is part of a series to refactor the kernel's
panic handling logic for better clarity and robustness.
Signed-off-by: Jinchao Wang <redacted>
---
drivers/video/fbdev/core/fbcon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
@@ -279,14 +279,7 @@ static int fbcon_get_rotate(struct fb_info *info)staticboolfbcon_skip_panic(structfb_info*info){-/* panic_cpu is not exported, and can't be used if built as module. Use-*oops_in_progressinstead,butnon-fataloopswon'tbeprinted.-*/-#if defined(MODULE)-return(info->skip_panic&&unlikely(oops_in_progress));-#else-return(info->skip_panic&&unlikely(atomic_read(&panic_cpu)!=PANIC_CPU_INVALID));-#endif+return(info->skip_panic&&unlikely(panic_in_progress()));}staticinlineboolfbcon_is_active(structvc_data*vc,structfb_info*info)
--
2.43.0
Acked-by Qianqiang Liu [off-list ref]
--
Best,
Qianqiang Liu