From patchwork Wed Oct 19 14:55:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 5627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp377978wrs; Wed, 19 Oct 2022 08:08:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM617Usdo/i124zTEzVVAcKah6gEqBiLgaJbdqv57YWyE6ycihECNsP0OeUto4RUmOHq1oMf X-Received: by 2002:a17:907:6e87:b0:78f:a596:5cf6 with SMTP id sh7-20020a1709076e8700b0078fa5965cf6mr7094961ejc.398.1666192092846; Wed, 19 Oct 2022 08:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192092; cv=none; d=google.com; s=arc-20160816; b=cU+j1xgyrIVElNUvTaKRG9RRWNsp9Y5n0FpqnhTScJUH5WBe9vO178AhhYtcDXz9Ur YY0inPIXLuwWLyX9SbdThc8DrdNaVFSJPsOmv517bKbs7x9Xy1Wa6XiMSfz1cq6PoFf+ cQwrrMUB1bWidCjgq3sgt+rvjyxPvyc40+XaUb+ODnQxfP5C9yt6OTyF9R48ybCCvxYY YiwpE19tJWfwDD2y3ySujc9qU5vFDc4fVwXXYrIgNFOZIkd5jMj6ZCZPpSXrv9gZyH4T +kWltkl2iGNr4aNfjan0rMJbDaW173ZFDiQLGsoVlaOEL+4GZoPMbkmbN81Oov5A/6To cyag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=q43bR7EIdzwEejtqYY/+0pBZ/1DlBf/ms3Th4977RU4=; b=CcEu39BR0wwqx8zXdoU5a+0JEB2aAMZYTU3q0yjeCbKMuW4+BPsmBgtU0v4Hvk4y/a y7nISK+21RZJ0dpapEkcqHuX3aCznQN9S6c2RHZCWd9wYmzP9IBktw6+CvuXMIiRgE14 uJjMaXelTEvDFroAod2avGZveNQki7VBdnF/JJO72P9qpFmM++x14yWfsQjHTgra/FSi 7IcBXwq1gKsYk/Fggu3TrM/eo6ZpCmuV2xMJcqxKGNj/hh6sXC4Z31+3gcJ+N5AD3+St YK0Cec4Q00XudqLG6bg1xRwUPF3RTua8PDbXKoEto5/ZnRXG5/gfMdyBV9xsxd5ha9WK Nf0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CJ0wkcfD; dkim=neutral (no key) header.i=@linutronix.de header.b="4/3XcDP9"; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a170906159400b0077bab1f707esi12032996ejd.159.2022.10.19.08.07.42; Wed, 19 Oct 2022 08:08:12 -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=@linutronix.de header.s=2020 header.b=CJ0wkcfD; dkim=neutral (no key) header.i=@linutronix.de header.b="4/3XcDP9"; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231634AbiJSPFK (ORCPT + 99 others); Wed, 19 Oct 2022 11:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbiJSPEE (ORCPT ); Wed, 19 Oct 2022 11:04:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196331929A9 for ; Wed, 19 Oct 2022 07:58:38 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191367; 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=q43bR7EIdzwEejtqYY/+0pBZ/1DlBf/ms3Th4977RU4=; b=CJ0wkcfDAIYxYlfRDwtWDHTwKRBKnIGO7mDk96DEhEfPYYF1oPQuNnmaWMjNVFx82t2g2p vzwkF94n0h7nEyhv0U93cY/SDg0gFrPMaHBWZPIoWnM4PkhT8ENrt1zwlq56m266UfO6ok E2Pf4W9zbKKXLfOeDb67zW0A+t3HCRbpaPaonrDqlLifvlY/UNRbzMHnKW0rU52czq11LU 2QA4703MQAMlTBiSbe41rKt7kIT0G7svma7Brz2sKaxLCd0oZwJQ/auRydmpv7zgddgQ7Z KT6cqgK7jbmb4Yo+LE3H9hyyE9UAia6OLCMO0LrI4vSPeblK36wIq1qdR3Gn5A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191367; 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=q43bR7EIdzwEejtqYY/+0pBZ/1DlBf/ms3Th4977RU4=; b=4/3XcDP9JpywLbtVPvYMt3perm+LULFBKeOfwGqUTnu4+/A8q5xycmiCMFah2+WEFeLmuc PyYB51N0P1g/zmCw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Shile Zhang , Xianting Tian , linuxppc-dev@lists.ozlabs.org Subject: [PATCH printk v2 10/38] tty: hvc: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:32 +0206 Message-Id: <20221019145600.1282823-11-john.ogness@linutronix.de> In-Reply-To: <20221019145600.1282823-1-john.ogness@linutronix.de> References: <20221019145600.1282823-1-john.ogness@linutronix.de> MIME-Version: 1.0 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747129040196485000?= X-GMAIL-MSGID: =?utf-8?q?1747129040196485000?= Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman Reviewed-by: Petr Mladek --- drivers/tty/hvc/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 4802cfaa107f..6d1d7b72488c 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -265,7 +265,7 @@ static void hvc_port_destruct(struct tty_port *port) static void hvc_check_console(int index) { /* Already enabled, bail out */ - if (hvc_console.flags & CON_ENABLED) + if (console_is_enabled(&hvc_console)) return; /* If this index is what the user requested, then register