* [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation
@ 2026-12-04 2:31 Pengpeng Hou
2026-12-05 9:37 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-12-04 2:31 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, Pengpeng Hou
The Malta board setup that activates the floppy controller is compiled
out when the floppy driver is modular. Some firmware already enables it,
but the board code exists for systems that still need that step.
Apply the same IS_ENABLED condition to the helper and its call. No
floppy module entry point is invoked by early setup.
The issue was found by our static-analysis tool and manually reviewed.
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
The original Git import already contains the built-in-only guards on
both the helper and the call; no specific introducing commit is known.
The patch was prepared with Gemini and revised with Codex assistance
(Assisted-by: gpt 5).
Built malta-setup.o for MIPS with Clang 18.1.3 and W=1, using
malta_defconfig and BLK_DEV_FD=m. With the same resolved configuration,
fd_activate was absent from the preprocessed setup code before the
change and present afterwards. No floppy controller or old YAMON
firmware was exercised.
arch/mips/mti-malta/malta-setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 816570514c37dbc73a2172f4ab6698aa59a20f4b..db8e296c486037dea0b7a9caf0a97707b8a991f2 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -68,7 +68,7 @@ const char *get_system_type(void)
return "MIPS Malta";
}
-#ifdef CONFIG_BLK_DEV_FD
+#if IS_ENABLED(CONFIG_BLK_DEV_FD)
static void __init fd_activate(void)
{
/*
@@ -227,7 +227,7 @@ void __init plat_mem_setup(void)
pci_clock_check();
-#ifdef CONFIG_BLK_DEV_FD
+#if IS_ENABLED(CONFIG_BLK_DEV_FD)
fd_activate();
#endif
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation
2026-12-04 2:31 [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation Pengpeng Hou
@ 2026-12-05 9:37 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-12-05 9:37 UTC (permalink / raw)
To: Pengpeng Hou; +Cc: linux-mips
On Fri, Dec 04, 2026 at 10:31:02AM +0800, Pengpeng Hou wrote:
> The Malta board setup that activates the floppy controller is compiled
> out when the floppy driver is modular. Some firmware already enables it,
> but the board code exists for systems that still need that step.
>
> Apply the same IS_ENABLED condition to the helper and its call. No
> floppy module entry point is invoked by early setup.
>
> The issue was found by our static-analysis tool and manually reviewed.
>
> Signed-off-by: Pengpeng Hou <hppiscas@163.com>
> ---
> The original Git import already contains the built-in-only guards on
> both the helper and the call; no specific introducing commit is known.
>
> The patch was prepared with Gemini and revised with Codex assistance
> (Assisted-by: gpt 5).
>
> Built malta-setup.o for MIPS with Clang 18.1.3 and W=1, using
> malta_defconfig and BLK_DEV_FD=m. With the same resolved configuration,
> fd_activate was absent from the preprocessed setup code before the
> change and present afterwards. No floppy controller or old YAMON
> firmware was exercised.
>
> arch/mips/mti-malta/malta-setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
> index 816570514c37dbc73a2172f4ab6698aa59a20f4b..db8e296c486037dea0b7a9caf0a97707b8a991f2 100644
> --- a/arch/mips/mti-malta/malta-setup.c
> +++ b/arch/mips/mti-malta/malta-setup.c
> @@ -68,7 +68,7 @@ const char *get_system_type(void)
> return "MIPS Malta";
> }
>
> -#ifdef CONFIG_BLK_DEV_FD
> +#if IS_ENABLED(CONFIG_BLK_DEV_FD)
> static void __init fd_activate(void)
> {
> /*
> @@ -227,7 +227,7 @@ void __init plat_mem_setup(void)
>
> pci_clock_check();
>
> -#ifdef CONFIG_BLK_DEV_FD
> +#if IS_ENABLED(CONFIG_BLK_DEV_FD)
> fd_activate();
> #endif
>
>
> base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 2:31 [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation Pengpeng Hou
2026-12-05 9:37 ` Thomas Bogendoerfer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.