Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2749385rwi; Fri, 21 Oct 2022 07:30:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/dpIvySr6lF7sMvKAfeuzF9MRKyQwuegPSZqgzaBdHOjbuRNELk55P/N7y6PXbxVESSMe X-Received: by 2002:a17:90a:bd87:b0:20b:1cb4:2c92 with SMTP id z7-20020a17090abd8700b0020b1cb42c92mr23185956pjr.210.1666362614504; Fri, 21 Oct 2022 07:30:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666362614; cv=none; d=google.com; s=arc-20160816; b=pCYiIaXS08Mv5OUwP9/cA8Lj59G7Z324nhWva3QNioaYShGvzvgEE56Thbwkjcr4WG Kd4LkV1AtSWVcmlRh1dUCyEjQDww4ENrV5LZquIUBXJ2TrNDICfmBvDL0+LfJUcFpXyU IK/07eGIY9huzWNMunYm866v4nssZia3Xo2Ak/0jKzgu+siLU2O8616uzLhwaOuoiHtA L3dcN3xYhNbOPn3l2aAjGmwQNp3GZ/lTJyTgfidKOlR+c2Cd3ilyslDzWETCu6E7UK29 D4+uJTJGUkg8iapvvwDlst/Wk1APnlm6fVZ4IuXMhofc5dUmfb3wOw9vt7CHS0wgdLgq ojFA== 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=lg47ticWAesjozzNRlpOg0836L4TUDvbY874Y7InfJE=; b=kAySz6JWUrQx/j95fNIHJDOPfOxrVafJ2wO0sLrh9JaK4j5D/2Y225+uSkANHlabaI prCuLP0Ceca+o9NC585zdzyt8ab6l8jJsV/mkcRAOgbRI2hHFDqtusVkcaoNqcX5OYDu CZIDyDlxjxU2ksivOpKfSiWLms5+KNVxu6hhE8DKvWNKiUpJWPFHa+1UXpszePJtWetk ob/mFxJAAPKUwkH5lanITHwPyitlxtS8Evwaq5gG8X6fzDevG3L4ZVII92X9aCvDoR7y FJWEFwfz+QzrjqVxeMQsnPmxn8LfODfpRJ85Bh7XUdHKMTumAZVs8n9w8EDamaC0a1pH 2mxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Leg3fTuP; 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 g6-20020a656cc6000000b0041b7be8ef1csi25402641pgw.219.2022.10.21.07.30.02; Fri, 21 Oct 2022 07:30:14 -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=Leg3fTuP; 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 S231396AbiJUOOH (ORCPT + 99 others); Fri, 21 Oct 2022 10:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231329AbiJUOOE (ORCPT ); Fri, 21 Oct 2022 10:14:04 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA3727BB32; Fri, 21 Oct 2022 07:14:04 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221019145600.1282823-15-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: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