Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2841441rwi; Fri, 21 Oct 2022 08:30:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6EKXoMxPis4eff7HishRgpBFzS8IGxFMk21PBb/BB0jKmQ5HviCRmAa7I/15/WPog1hjl+ X-Received: by 2002:a63:5a61:0:b0:41b:b021:f916 with SMTP id k33-20020a635a61000000b0041bb021f916mr16302063pgm.387.1666366206959; Fri, 21 Oct 2022 08:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666366206; cv=none; d=google.com; s=arc-20160816; b=Z2p7Nkq12yXK15aS5VKcRkqbJr8XzMiO49WS2OVcuBtAC+PJYOEJ2whxvcQtIgHS4h 27wVpmSi6CKCm/7glwSHiYEVJzn5LF3sltjlHsn4DOlecjuq980MbAN/J4LOrcBBzG4j 5B9lynF8u+xbcdar636ICtm2djI1QQMOylEc40cgeHcvwK5WqbTrI6J7X6mMSiQ7B2u1 6l9V4lCrUbMpRaJObLOEwYVbp/ZYMwIOKyR2Cyphl5pqLXzgBfUoAW/JjEkau7YFZm0W ecUftMoR93NT2S1HT8q+xCc59idKaKNy+0i/h4KKhtICBNwDD1qnY8kP69Xpdy0iQpXT VFmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+r+MUYg4L0jiEOtXgDxphdKLvrOHZIrBRHvnZMBKsV8=; b=MUTPPsb1Wu8RQDdCE6ItJm91wx8FoWiZZewOqtRoEXwX/6Sg/Cu052v/6wXV1SXzMc sYZzEZjLZDxXCvqB1yukW7WXue4wDouZK7ZkB36GnDRz290bAtW2VcQY9o5IJ0XtT4MK LKhXewev1P4f8l0RGg9w0Tk6ZvoEa4OjQKfxZn4yaTGBX9psJvIBzATtUp5iDibH19PL NL3gxaAIOQzaaOVkCYo1D+QItik6qAQZ59OSBFrScruQEFZKwFwDp98aIfBpqGRkJy2F WdQmie72EwLaPemt9qRww5XxtL1e8Tx1oZvRhaFFHcoP/jOstOLcTFPwPxOZIXmMVjJ7 L5pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=dA2qrfhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a655282000000b00469e1f7dcbesi25650065pgp.603.2022.10.21.08.29.54; Fri, 21 Oct 2022 08:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=dA2qrfhI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229752AbiJUOXt (ORCPT + 99 others); Fri, 21 Oct 2022 10:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJUOXr (ORCPT ); Fri, 21 Oct 2022 10:23:47 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55F1327C95D; Fri, 21 Oct 2022 07:23:46 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221019145600.1282823-17-john.ogness@linutronix.de> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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