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 4F1F7C43217 for ; Fri, 21 Oct 2022 14:24:50 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=okmLjC8FkWh2wh6T8cwfnu7iZCCWWmCuYd/LgHFrhbo=; b=rBy6GwJ1WrZ5Yy vB7Zz/7/yC5d3zisiOpLaYTD6oTsaI7oVAnWAyJkWqLR9yMBZ3Q8c63yMkGa8UQFtzwmCgC0MvC7C 1N6zSiZ4pF2smp2s3bENuDbikR72zh/et2Or5akp1rxHZIrWiaBgYLGpvJfrImYwNPnJWb27trWsC +6pVxbT3AZ2ZMp53c8p3gRykahkGdk6PbY2sowaAFa3KECk8SRoypSEIlOpFp84zH39w/1uTkvY2w Afo3ORFoxYMVYS1nl1zPhf5C9AJBS1Iw5wSY+bNmHq19gG+JnHLUGBGAdgAPy2VjqMRnMCr9H41G6 hnELs+khSxzSThtJ3xJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olswE-008TG4-9e; Fri, 21 Oct 2022 14:23:54 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olswB-008TEo-1u for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2022 14:23:52 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 07D6121C3C; Fri, 21 Oct 2022 14:23:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1666362225; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+r+MUYg4L0jiEOtXgDxphdKLvrOHZIrBRHvnZMBKsV8=; b=dA2qrfhIRkyi5E40MTeWY0jF2NdAhbF5yi2wyOMOtqv8DbGbnqIh6OomAAkIeL1nGBbM/9 TF2KsRVuOQad+2VxK06MNqoU+GlN4zx2EPzfzkxnooF0fJTX1QoYgAa93qN2IADaKjh0s9 T2M97KHe03rUv/R5UXIoAigmwYJBbQw= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A94BA2C141; Fri, 21 Oct 2022 14:23:44 +0000 (UTC) Date: Fri, 21 Oct 2022 16:23:44 +0200 From: Petr Mladek To: John Ogness 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: Re: [PATCH printk v2 16/38] tty: serial: xilinx_uartps: use console_is_enabled() Message-ID: References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-17-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221019145600.1282823-17-john.ogness@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221021_072351_253595_16F9F4B8 X-CRM114-Status: GOOD ( 20.61 ) 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 On Wed 2022-10-19 17:01:38, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness > --- > 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..e1fe95bd55c1 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_enabled(cdns_uart_uart_driver.cons)) { > console_port = NULL; > cdns_uart_console.index = -1; Again, IMHO, we should check here if the console is in console_list. We should not clean the port and index when the console is already registered. Again, this is old problem that might be fixed later. The change is straightforward. Feel free to use: Reviewed-by: Petr Mladek Best Regards, Petr _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel