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 CDC02C4332F for ; Fri, 21 Oct 2022 14:15:17 +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=UptgrFDfcvP3hC1+G9m4bRy1KBJQb21ul0NY/c/xfLs=; b=uKygRlvQJUOKTE iPdLdI1EgmUm9sXs8J+53paamGHadvRzalk6IWVD+TOtdalrGzpK6GA0pjtuEMj0kRFgIaYwZZByK dwgcdmoIUVOhfb91kqunUU0F9l2jELDUgzr0lKjcDkRQWWbFvm9wcBzFOuf3Q14zitfaCOf6QdCz7 XjRxdx/RWibZyD3pAnnJ6XqoxH+UW45ab7EKjY4Ty2WJzkCzR1ZAd9LmLYxxgaUnnm+1MJoAB5RVu iTQvXhJ+zWbVMsukDbwrFmaSD3B45TKsYuwg9/uhvd+/lO5XUbrJLIyIuG2ctLdJ66ksldc1lMo8c ddmPRK13493/XgGNhDNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olsmp-008Qpx-GU; Fri, 21 Oct 2022 14:14:11 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olsml-008Qmp-AR for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2022 14:14:08 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id BFD991F900; Fri, 21 Oct 2022 14:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1666361642; 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=lg47ticWAesjozzNRlpOg0836L4TUDvbY874Y7InfJE=; b=Leg3fTuPY+qDWuwBrQprly4zHHQbg4dStKVHcQTU1rbDsXhFkqhchJYtpeFu/zOYXrqC4l J2kbaPStzlFUAh+5tFvru1/IcmuKEkFov0mS607qFde1Iv3qDKserjU78SD9xqnSUb+28b X/PfbVUs9qiDF/BFSrgixosznekTIL0= 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 549942C141; Fri, 21 Oct 2022 14:14:02 +0000 (UTC) Date: Fri, 21 Oct 2022 16:14:01 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH printk v2 14/38] tty: serial: samsung_tty: use console_is_enabled() Message-ID: References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-15-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221019145600.1282823-15-john.ogness@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221021_071407_523065_8771C4EB X-CRM114-Status: GOOD ( 19.24 ) 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:36, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness > --- > drivers/tty/serial/samsung_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index 77d1363029f5..8142a0e53ffa 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -1732,7 +1732,7 @@ static void __init s3c24xx_serial_register_console(void) > > static void s3c24xx_serial_unregister_console(void) > { > - if (s3c24xx_serial_console.flags & CON_ENABLED) > + if (console_is_enabled(&s3c24xx_serial_console)) > unregister_console(&s3c24xx_serial_console); > } As on many other locations, it would be better to check if the console is in console_list. CON_ENABLED might be disabled even when the console is registered. It would be nice to fix this. But it might be done later. 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