Message ID | 20221019145600.1282823-12-john.ogness@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp379353wrs; Wed, 19 Oct 2022 08:10:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70rvs3v/MuJQNH1EuASYqrqpai7K9KfvRczY3FU7N3h++/x7hGsOoE6mfNHLfgDhtL8V2F X-Received: by 2002:a17:907:9713:b0:78d:8e23:892c with SMTP id jg19-20020a170907971300b0078d8e23892cmr7020408ejc.449.1666192243004; Wed, 19 Oct 2022 08:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192242; cv=none; d=google.com; s=arc-20160816; b=WRnFCbVtUvsHmSpcJgHWm1m4TcT1OYvsl0roCTxSIIHvk/es5qw+peWqdgCFvpOi2E C7+JxhLa/uIUj+iqc1QFXczjJp9I25AlF3Ib3ZJM+F0yDsXgx8td9nzWug4AxqmZGqe/ jtuLWpUxu3gOkRRgv0+KpIcbSScEjNp0g224IJz39Nc4eKplgfeIoQTVedc67aJ56azp wnUMRK+xO+dgJmdk1V3JjX9EazRACkWIKJj5TZIc2vnyYPD4IzvbjTFnzQTaNeWg2J4D D6FpdsajWP4XK7NE6wAGPOhwnwO76OHBvjufWHKNmXZJwwfAuQ3OVevBYeaXNf6lMl9G eHeA== 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=cANA2HumoCM7OV3714mDIj5DFLk1sHCXsW4mcU0VIIA=; b=dNS094MMuClohqgRjGfeujOZYGaUest4DRbYIvQ9AFf2YzXy2qnDSh45MtGsdWnDoW zdcbx+B5hetGi4sT7OlI+lOaTGjh1xBIACc5tNrT7vZ3xIW3vNkRnvoa0bO4O6RMnuQM NZHM7DRy9Ra1XPinWxVsbnF7bIduzoHcij+QQUh5ZNgU3G6G3b4e9SRNEAB6ZI67ccD5 xubc2Wzvjkg456t+JAiZJMK0HobkMO4e5ye7HWackn77mGIteTjDYWSlbyfBmPYVgPS5 5NEb/VnCAIh3/EL5u2+TNzomDxF/ERVb1GA89cDvolG59bvF+hG1sHtzJrPVtxeNzIZB 3AJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="UH0/62gi"; dkim=neutral (no key) header.i=@linutronix.de; 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 k13-20020a1709065fcd00b00740110c599bsi12577765ejv.146.2022.10.19.08.10.15; Wed, 19 Oct 2022 08:10:42 -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="UH0/62gi"; dkim=neutral (no key) header.i=@linutronix.de; 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 S231806AbiJSPF2 (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 11:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232136AbiJSPEG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 11:04:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 935CB17A01B; Wed, 19 Oct 2022 07:58:35 -0700 (PDT) From: John Ogness <john.ogness@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191368; 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=cANA2HumoCM7OV3714mDIj5DFLk1sHCXsW4mcU0VIIA=; b=UH0/62giDRacTgc6LWjPHq8aCEv5jkdDEzI/MA8Jup622emiuKoX7BLt8gRNRy9hdeFVnl EfYBYT1slOvZDZRzEYjnihQ/kb/pSC0sh+4hDZTe//uS3JVcMaASNn8iGoYSm1SazG2vWu rfA1AG3yElx0WcfZJJG2/V97uLL7zKyUS5JShA2ytxO5Fh7YQzi8/7WTxInUnWi5M73WCI j6zCLeQepuBdR7m/KMJa5r18w82h1KE96DJxw5pUNwJwUMgjkxcZ9XzvU07IH3AtxI4al8 qGXhSz0aOTdStNeIxhst5X4QNC5Ip1L8vaF0n5xzmGMrOsDxYBuv3gLeRDfPdA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191368; 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=cANA2HumoCM7OV3714mDIj5DFLk1sHCXsW4mcU0VIIA=; b=KQbMsoI8kPiCKg4t2VNCGQ7wjHS2dtIutEdNfXg4Ksb0sa7p4/aiaOHQFSJrrFe8FAeRCI P7dHuNzNimUGeVCQ== To: Petr Mladek <pmladek@suse.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>, Steven Rostedt <rostedt@goodmis.org>, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, linux-serial@vger.kernel.org Subject: [PATCH printk v2 11/38] tty: serial: earlycon: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:33 +0206 Message-Id: <20221019145600.1282823-12-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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747129197298350277?= X-GMAIL-MSGID: =?utf-8?q?1747129197298350277?= |
Series |
reduce console_lock scope
|
|
Commit Message
John Ogness
Oct. 19, 2022, 2:55 p.m. UTC
Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
drivers/tty/serial/earlycon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, Oct 19, 2022 at 05:01:33PM +0206, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Wed 2022-10-19 17:01:33, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index a5f380584cda..bdfb60da97bd 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -181,7 +181,7 @@ int __init setup_earlycon(char *buf) if (!buf || !buf[0]) return -EINVAL; - if (early_con.flags & CON_ENABLED) + if (console_is_enabled(&early_con)) return -EALREADY; again: @@ -253,7 +253,7 @@ int __init of_setup_earlycon(const struct earlycon_id *match, bool big_endian; u64 addr; - if (early_con.flags & CON_ENABLED) + if (console_is_enabled(&early_con)) return -EALREADY; spin_lock_init(&port->lock);