From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.175.24.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796466211; b=QPeUOacHnTqgqoQxxhu/VuD2oj4LK9vbTm9lqJU84EGoYnbmvNrp6qcUqtkah6132sfD RuHXytkJlBceLvmxhdF4BCsZNlF6ZqediV4x5gD19iggqGG6Evfh8+G8arg299DEus/LL iWEKz2BGjkiHxh0dW0IAJjUIO2BVhjMLcbuxpin6yb8CDl2qtyKQJOmzxbP8PCrtODtqY NEes7jWO0YxJsplUNudtQ2UPfjuCMq8jsUX3y1r+LvouJPbTPXoziTpu/Ya1Z6vRZ8/bs 54FWTztQ++TA/cnHKmZ06vY1EgyCKRfvDQVRpATDywQDiCnOxAdX2jxYMzS4jvfACpw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796466211; h=DMARC-Filter:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=3OnV0mPN/2E9+kKW1yIuLef1PEG3GnIKR3v9TsEVZLY=; b=qN+N4Dyw1r9AKbW6tf6+Aj2frQoTcfXfeT5y3kb0dKGs1/eDcKSPLSvEuXQIo7jOgwmO T2iYYlu/+RiMfeMXI/l10/WQQSQWd4xjhnUy6fjRIRaSvVWdE2yH0yxXNr4Q9NinGJQ2u tOhdrg8cRPV/hr7ob+6NKff9d1gkcw6Zgi0ZFBmeVVcSOY/ntsKnaphXnK3VjiHS15Bcf RgcleGReXT9dkmw1K1v08oREAy7NXSprKlZt1q3GNyaydJSHx2yOKN/hNL4435vLCrgM7 SwRRQvJV1moEBGyOv4UkRg8rkl3oBnvfIchzd0yEmDoIK6UfJNyNsGtW67FfE/KSHpw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.remote-ip=193.175.24.41 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B775606A333 for ; Sat, 5 Dec 2026 10:23:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B775606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: by elvis.franken.de (Postfix, from userid 10) id 60C48100458; Sat, 5 Dec 2026 11:23:21 +0100 (CET) Received: by alpha.franken.de (Postfix, from userid 1000) id 2421FC0A51; Sat, 5 Dec 2026 10:37:57 +0100 (CET) Date: Sat, 5 Dec 2026 10:37:57 +0100 From: Thomas Bogendoerfer To: Pengpeng Hou Cc: linux-mips@vger.kernel.org Subject: Re: [PATCH] MIPS: malta: use IS_ENABLED(CONFIG_BLK_DEV_FD) for floppy activation Message-ID: References: <179635146281.74470.806921509153881113@163.com> X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 ]