From nobody Sun Feb 8 12:14:32 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D58AC7EE25 for ; Fri, 9 Jun 2023 00:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbjFIAdh (ORCPT ); Thu, 8 Jun 2023 20:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231580AbjFIAdd (ORCPT ); Thu, 8 Jun 2023 20:33:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 922DE30C8; Thu, 8 Jun 2023 17:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=07+hV5uSDDJLUm8XLuemkRmQ1/NA1t2O44DKghOBv+g=; b=IMvII713AqfhBro+1bWtv24I/j +na2Q4M5jPhrGex1+xBgwJL0Ky/SKldSBfpsGtbFPiBBFnb9l9+AsqffLboMQR8d0K5iDdoWwDseN gbqCEQytGNAcbJHkCh1mxMQ1cD+5qAOTVF09eFFTAZqj2Fg1MbsYZpd2VNEo//BquYL8hnIf9/2zB b49wKBH8ee/SdPPRUIUSHNUJBkdqBrL7SNx78waCio4SJeHUJ+kol/yEIl8/Pa9UvjlbMmxaFU2Tx mcMdMjwbFnejubjsdY34HDFghHtqnVZ+bfB9ME/YuyMr+QuPwJq9J+oiBdAXcD/ASdhluTmjTHidJ nIgwzJ1Q==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q7Q4I-00B4uV-2L; Fri, 09 Jun 2023 00:33:30 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Greg Kroah-Hartman , linux-serial@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/legacy_serial: check CONFIG_SERIAL_8250_CONSOLE Date: Thu, 8 Jun 2023 17:33:28 -0700 Message-Id: <20230609003328.15008-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When SERIAL_8250_CONSOLE is not set but PPC_UDBG_16550=3Dy, the legacy_serial code references fsl8250_handle_irq, which is only built when SERIAL_8250_CONSOLE is set. Be consistent in referencing the used CONFIG_SERIAL_8250* symbols so that the build errors do not happen. Prevents these build errors: powerpc-linux-ld: arch/powerpc/kernel/legacy_serial.o: in function `serial_= dev_init': legacy_serial.c:(.init.text+0x2aa): undefined reference to `fsl8250_handle_= irq' powerpc-linux-ld: legacy_serial.c:(.init.text+0x2b2): undefined reference t= o `fsl8250_handle_irq' Fixes: 66eff0ef528b ("powerpc/legacy_serial: Warn about 8250 devices operat= ed without active FSL workarounds") Signed-off-by: Randy Dunlap Cc: Uwe Kleine-K=C3=B6nig Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/legacy_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_= serial.c --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -508,9 +508,9 @@ static void __init fixup_port_irq(int in =20 port->irq =3D virq; =20 - if (IS_ENABLED(CONFIG_SERIAL_8250) && + if (IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE) && of_device_is_compatible(np, "fsl,ns16550")) { - if (IS_REACHABLE(CONFIG_SERIAL_8250)) { + if (IS_REACHABLE(CONFIG_SERIAL_8250_CONSOLE)) { port->handle_irq =3D fsl8250_handle_irq; port->has_sysrq =3D IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE); } else {