Message ID | 20221116162152.193147-31-john.ogness@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp233783wru; Wed, 16 Nov 2022 08:26:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4nAxbAxvHpdr66tJckXcfDbpVaTFJzm5qu/SrUQJ44upe4hS7F1QF06WCw/8oGCw8zR4Th X-Received: by 2002:a17:906:ae53:b0:78b:15dc:2355 with SMTP id lf19-20020a170906ae5300b0078b15dc2355mr18064998ejb.306.1668615990752; Wed, 16 Nov 2022 08:26:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668615990; cv=none; d=google.com; s=arc-20160816; b=HIU+BDbqtkMKrnRJxPuEyDEVZQ9rEbMNII52GSUgaiVFiBf9yMMt9kXnguHRRH+akO 4pp6nQqGziacvVLK07tJpYIExMvWcJIhHEZhLXyF3QgDoPRlJlBvgu91XFMJNWRCO5nS Mx0vqUk4IEqE7x29oOgvow8bLM5F20uLFdm+3rwfsOVPg2OGNTUeLFNbmFpIU3rfs6Ji qmf6FSue1v1UXXL0+oW6C6oZkRsTB6t85McTJ6NS3CAndETohVHjJlzsxuF83F2qIobM a8boyDvYJvmbyZ/hvfQcwpEBeMpSzXjfvQsIqv8rMZzbziBC2BhaTjL/hcm7+nTGq4dW OzXg== 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=pqonCTPpfZXjo2LPJFdK8fQ8y1w5Fa/kW7qM4AbVqk0=; b=p45foi6545j+HLU2Llz7yNnc0xNY7EwCEaFFw6h0kb+7t+73sHpxTm9ai5wWmB3VfQ bOGb1nWC3jYqRGMBu6SCf9eVCCEQgWHjBAluemfL5mFxibFt9qolEXMfgtZXDVcxx/a7 MUJ6u2bKMnXCEXkhN136SlmMHyi+6Ay9waFaX54uBckRHhpJ1QnfcbJV9MaAAEPHKoj+ v/QeSSjHQifAdf355N0vlZXlWMTi9VZC3F2aJj5bsq96m4KXhFn8FtZ+oKSHFzMSGabJ 8FI9P6PzkgRKZ9AvH/W7mKw9whBISBiijsZVvfwzYDlaFulENJYUfx6HU4s4SWi6qVpy bu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OgkpFCVa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JV6AAcU+; 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 b17-20020a170906661100b00783a5f78700si6090659ejp.226.2022.11.16.08.26.01; Wed, 16 Nov 2022 08:26:30 -0800 (PST) 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=OgkpFCVa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JV6AAcU+; 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 S238971AbiKPQZd (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Wed, 16 Nov 2022 11:25:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237725AbiKPQWx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 16 Nov 2022 11:22:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FCB558025; Wed, 16 Nov 2022 08:22:13 -0800 (PST) From: John Ogness <john.ogness@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668615731; 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=pqonCTPpfZXjo2LPJFdK8fQ8y1w5Fa/kW7qM4AbVqk0=; b=OgkpFCVaiSeO+LQ/j6+zQtq0n6iDywSpXysWk+wGMxn5NY8Lpi6yEZG29Hs13yIGUGGf7R IovDJ3VKpFrFu0ZT3784+ms4boN8yY81gPMPLxy5VLgxm9VswgG4LDSV6RwpCD6M18PPQ3 DyvuO05Uo5p96U8R2Agq2vPpwEMV8YpJCMOK2BdOpY5PZsYXMaM19hhfMKY/s3owD+3a5k O/HcKUBHgAWTZQjptpPfbkxfcF3tdywNkKIjcDhE2kwOn6GOZFG+EbEt0l4AsvopEYk96q N4BTImkK5B+on64cfPxFCgcXeQozIy0aoaIyDk++6N4dgk7GQcfgKy1so48+ng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668615731; 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=pqonCTPpfZXjo2LPJFdK8fQ8y1w5Fa/kW7qM4AbVqk0=; b=JV6AAcU+EGEfeBSOpHE/d0qAz6Prk9Itjm/unhVn8fP0nUKjQJimz54c1dr/2zk1crSuUF XRu1eOSeIs9uzyBw== 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>, Peter Zijlstra <peterz@infradead.org>, Mathias Nyman <mathias.nyman@linux.intel.com>, linux-usb@vger.kernel.org Subject: [PATCH printk v5 30/40] usb: early: xhci-dbc: use console_is_registered() Date: Wed, 16 Nov 2022 17:27:42 +0106 Message-Id: <20221116162152.193147-31-john.ogness@linutronix.de> In-Reply-To: <20221116162152.193147-1-john.ogness@linutronix.de> References: <20221116162152.193147-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?1749670680892776173?= X-GMAIL-MSGID: =?utf-8?q?1749670680892776173?= |
Series |
reduce console_lock scope
|
|
Commit Message
John Ogness
Nov. 16, 2022, 4:21 p.m. UTC
It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> --- drivers/usb/early/xhci-dbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index bfb7e2b85299..797047154820 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -927,7 +927,7 @@ void __init early_xdbc_register_console(void) static void xdbc_unregister_console(void) { - if (early_xdbc_console.flags & CON_ENABLED) + if (console_is_registered(&early_xdbc_console)) unregister_console(&early_xdbc_console); }