From patchwork Wed Oct 19 14:55:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 5633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp378184wrs; Wed, 19 Oct 2022 08:08:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM516WidMSA9F/o6KJsONZiv6Xk5YuFjiTgvD9UOttYgRCp8AuCYgpa4tmuXZ5zra8ZYhQFc X-Received: by 2002:a17:907:720e:b0:78e:2b59:fdf1 with SMTP id dr14-20020a170907720e00b0078e2b59fdf1mr7377979ejc.659.1666192118889; Wed, 19 Oct 2022 08:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192118; cv=none; d=google.com; s=arc-20160816; b=DLFcx7FI7RKR8qe4Na2wb2SefLe8l0Szh0p+McvQJGY1d7Q0SOZJZcAyaEBs9BMILn +mInKrmy/cXO/DF2yyninsLegwSJbNo//0d4wz+4EHbrEq+ZH8/WzYIih3gs9rP/fmwY afVlVhVccOAJRWUHHi4YkuzDBoOH+mZ4BYt4ZIrHhNcdjbaShOdiTEDMYA0rR6d5133i iXEuOXXADLexpvC5+RLUwn93wg75oKKHYGXQg4sLCWrLBS68FUW9I82yHYb798d+fV2S r24YI/dXK36DW2Yu/1kLbKgYWYmPzdTwpHzPUyQ0Qx6DnKGh+38cVOUHh1v1AFw/NAQ/ a2Rg== 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=A5NubkodPN0irIWt1R4/lmY742ka0PyGCnf6KGs6APw=; b=aIQw3j1pyWmM0VYmsehwXecGrchxoZqp7L3SXxn96jQFyxWZrcKd5nZyAk8JM34QTl 7nv1GA0xEIzDa6N3p5tQyJa9JiFB3eIrYxTSuFHyM+gWOCRD5cXVAXjrf1U3dVU8N9U8 6oDez7DflxcCWTQIwba040hxKXF5RJgOWRdzUA7/UfpUI/z1i9lOVAzflhgnI7hPEenD rshxwESQzlyVRR7Acv+t18tTu+EHlUkBIreg6q9cZUvAkfEL73Hx0jBSixvUrSjLjm1h CRI8Ti1XS0wHSCW0B7yNBI5Al4s30NjxWMc6sRy41DhIKfCCLhc0Fb73voxu8mFo5YTN 4rXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WEzWfi4K; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=7C+o7eTS; 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 cy19-20020a0564021c9300b00451db83b2d6si12276494edb.312.2022.10.19.08.08.12; Wed, 19 Oct 2022 08:08:38 -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=WEzWfi4K; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=7C+o7eTS; 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 S231344AbiJSPGJ (ORCPT + 99 others); Wed, 19 Oct 2022 11:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231613AbiJSPFF (ORCPT ); Wed, 19 Oct 2022 11:05:05 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E5091DDC6 for ; Wed, 19 Oct 2022 07:59:03 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191371; 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=A5NubkodPN0irIWt1R4/lmY742ka0PyGCnf6KGs6APw=; b=WEzWfi4KYJK6tM+UtRO9gMqcL80wT6ZfChj8pVIGHeb3YIK8WqcUSy2zLWw/YojPSsGNup y7TQiRk0nnLkGjmOTqw0TEl1/pK8HDisoKp2Nk5Yb4JeRsivDB1CzI0E2o2qg0LVhsdq8m zyNH5ObjKPbpSu80an465e/0eKD5IrMpnPWTzA90Ir/JAkTes5pABQ40isFhZEHLol3hQf G/9qi1yXpMDuoHf2/pGXSYMCmXLbcMI9K/QMqEtFkkge19m+3XWRUYic9PsXu+yn2/vmRZ FNkJG8kyRt1kEdOSxEc5o/S3bJfASgsb4wf/OAS1njjVebC3sch6ryLQd2ZEmQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191371; 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=A5NubkodPN0irIWt1R4/lmY742ka0PyGCnf6KGs6APw=; b=7C+o7eTStwH+TXiK5kilPxMT0uoA0rWx2USLmgf4Q5VlRjt97pmtga3hTsgy3a6OZTtOaX Cj0gT50z2MtWHsDg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH printk v2 17/38] tty: tty_io: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:39 +0206 Message-Id: <20221019145600.1282823-18-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?1747129067417336861?= X-GMAIL-MSGID: =?utf-8?q?1747129067417336861?= 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/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index de06c3c2ff70..2050e63963bb 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3532,7 +3532,7 @@ static ssize_t show_cons_active(struct device *dev, continue; if (!c->write) continue; - if ((c->flags & CON_ENABLED) == 0) + if (!console_is_enabled(c)) continue; cs[i++] = c; if (i >= ARRAY_SIZE(cs))