From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Pengpeng Hou <hppiscas@163.com>
Cc: linux-mips@vger.kernel.org
Subject: Re: [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation
Date: Sat, 5 Dec 2026 10:37:57 +0100 [thread overview]
Message-ID: <axPbdTq1TgsFvKhI@alpha.franken.de> (raw)
In-Reply-To: <179635146281.74470.806921509153881113@163.com>
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 ]
prev parent reply other threads:[~2026-12-05 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axPbdTq1TgsFvKhI@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=hppiscas@163.com \
--cc=linux-mips@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox