From mboxrd@z Thu Jan 1 00:00:00 1970 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 90941C433FE for ; Wed, 16 Nov 2022 16:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238943AbiKPQZV (ORCPT ); Wed, 16 Nov 2022 11:25:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237567AbiKPQWw (ORCPT ); Wed, 16 Nov 2022 11:22:52 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9596057B5D; Wed, 16 Nov 2022 08:22:12 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668615731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n0N6+oqs8YDesp1N8syBA/TOKLtd+9UFIcKPgI5bch8=; b=wPgQxX1oQOVhnIHx4abeauz5e7rEg0cwq5AOSReGNyVI0GuDMJ6kOxzMqgo1hBiby93eiw 5hBeCrKYPerk7JvYO8vosiWvKyDPP4cAvtIpw/1zVg+gGlgIShIO0DOXM0NlWFYl5WeH1w WA8DgdazYTIbRMqodAkgxFBB3+Mm0uDgTkJf3dn5f46ZjCd5kn97toOZnVj/equ7JrSvUO r/4XzPjW/bQmnrL64Or8kzA5/4EVeUCgg1O+2wDvVFNd9QBb1iSKtJUbwpkRHjvnQ/F/U4 G0cFr/34shXiB9Hei+AMjQk4UsbqUF58IDPWuUFjW50qPwjkdAmfQ9w5cU+LXQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668615731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n0N6+oqs8YDesp1N8syBA/TOKLtd+9UFIcKPgI5bch8=; b=MyQecpelV/Y/Ej5hHdh0TQTK+n3Ui1E7BQDeR9U4wt14VpwlS8pr/VUvxnyUuEshVddrWN FzYp4/jEDqsa0BBg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Michal Simek , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH printk v5 29/40] tty: serial: xilinx_uartps: use console_is_registered() Date: Wed, 16 Nov 2022 17:27:41 +0106 Message-Id: <20221116162152.193147-30-john.ogness@linutronix.de> In-Reply-To: <20221116162152.193147-1-john.ogness@linutronix.de> References: <20221116162152.193147-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 2eff7cff57c4..0cbd1892c53b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1631,7 +1631,7 @@ static int cdns_uart_probe(struct platform_device *pdev) #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /* This is not port which is used for console that's why clean it up */ if (console_port == port && - !(cdns_uart_uart_driver.cons->flags & CON_ENABLED)) { + !console_is_registered(cdns_uart_uart_driver.cons)) { console_port = NULL; cdns_uart_console.index = -1; } -- 2.30.2 From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDACCC4332F for ; Wed, 16 Nov 2022 16:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=23fhhF5EQ0eC+SuZ4ym3tPp5RU4P/TpOetN6G47cUaI=; b=gSYXONL6k/15i/ tun6Z9tKEvteKtYWy9SGSbHzjHvOaby34UAQehN+6982q1GMsfQDL7Y7JdL7CflKauAJEJS7jInnA tChIAEVph4/1/TXIAf88y8I/GNb/jrAEZAiVUIPvlRPzGLZOc4rhkOB11OWWAofnJjCyb8ZAPQaOX G2OAfIoc6GwmVBHTGTDN2OL7curFhVUT4SwAEYIdMDyd3Mch+NJes5Y8bHrn/8ma8YQLsAW01v2Re AR5LOc7sHYwIrDmV5V5WdIcZ8OPryBDjCrSfKjn0KAMV+MTpFHmcFhpbHplZmbJKtFYItzlty3lzd bglbX9Etod6R6d/y4wcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovLBH-005obu-Rd; Wed, 16 Nov 2022 16:22:31 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovLB2-005oU6-RR for linux-arm-kernel@bombadil.infradead.org; Wed, 16 Nov 2022 16:22:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=n0N6+oqs8YDesp1N8syBA/TOKLtd+9UFIcKPgI5bch8=; b=ME8tN9mdQdov0fHd1JlTgXUsfM TYW31rE8KxfRqWZld1QWn75zo8Lze2qf7jMbrhQuBApbfQAGbAOSPDRy5jdHPgIzXnI8dHHmTB2Cx uiku+e9HFAypEwODwkKb5JU566zKR/LXWZzd+hm0NuoCyLbE30s633IxYdWuYIAy0V8f8PCB4DVnj SinCYSLZPsfyCgVS0Ww+Bp+wpXbLLnj2mO6AaJZIVmlka1AGXgYQTmiKDYf47DJ3g5RY6/LAY+g4l sX/7fxC3qXg+rlywSsgpoxajBRuQGOjfzX3IjoLXTqm48TtDyRMy2SvJPSBbQTIXuG/dAy9R29h8e ZX+SWzMA==; Received: from galois.linutronix.de ([193.142.43.55]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovLAz-001O5f-CM for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 16:22:15 +0000 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668615731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n0N6+oqs8YDesp1N8syBA/TOKLtd+9UFIcKPgI5bch8=; b=wPgQxX1oQOVhnIHx4abeauz5e7rEg0cwq5AOSReGNyVI0GuDMJ6kOxzMqgo1hBiby93eiw 5hBeCrKYPerk7JvYO8vosiWvKyDPP4cAvtIpw/1zVg+gGlgIShIO0DOXM0NlWFYl5WeH1w WA8DgdazYTIbRMqodAkgxFBB3+Mm0uDgTkJf3dn5f46ZjCd5kn97toOZnVj/equ7JrSvUO r/4XzPjW/bQmnrL64Or8kzA5/4EVeUCgg1O+2wDvVFNd9QBb1iSKtJUbwpkRHjvnQ/F/U4 G0cFr/34shXiB9Hei+AMjQk4UsbqUF58IDPWuUFjW50qPwjkdAmfQ9w5cU+LXQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668615731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n0N6+oqs8YDesp1N8syBA/TOKLtd+9UFIcKPgI5bch8=; b=MyQecpelV/Y/Ej5hHdh0TQTK+n3Ui1E7BQDeR9U4wt14VpwlS8pr/VUvxnyUuEshVddrWN FzYp4/jEDqsa0BBg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Michal Simek , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH printk v5 29/40] tty: serial: xilinx_uartps: use console_is_registered() Date: Wed, 16 Nov 2022 17:27:41 +0106 Message-Id: <20221116162152.193147-30-john.ogness@linutronix.de> In-Reply-To: <20221116162152.193147-1-john.ogness@linutronix.de> References: <20221116162152.193147-1-john.ogness@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_162213_546815_BA5EAB32 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 2eff7cff57c4..0cbd1892c53b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1631,7 +1631,7 @@ static int cdns_uart_probe(struct platform_device *pdev) #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /* This is not port which is used for console that's why clean it up */ if (console_port == port && - !(cdns_uart_uart_driver.cons->flags & CON_ENABLED)) { + !console_is_registered(cdns_uart_uart_driver.cons)) { console_port = NULL; cdns_uart_console.index = -1; } -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel