From patchwork Wed Oct 19 14:55:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 5626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp377970wrs; Wed, 19 Oct 2022 08:08:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4icaD0q/jYeAJ1y8pRDUNoaWVN8tel3AvFFgFj/j4d9OoO6NuHSx9jff7DtZMcpx0txtx5 X-Received: by 2002:a17:907:1623:b0:78d:9e8b:171d with SMTP id hb35-20020a170907162300b0078d9e8b171dmr7104094ejc.309.1666192081751; Wed, 19 Oct 2022 08:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192081; cv=none; d=google.com; s=arc-20160816; b=jcCjEbaaf14BACEwM0kMb6vDGojfqYO+O2IFdG1gSyR337PFSbgrZoc9PS0RZAhQN+ dNJ7RJfHnfG1pZdyCntUF3d9h4DiJ25r6ghOOkf6RZyP5Mx/nDFJvwO6qoS5UCWjNP/p KCh/C6G28hdGJNvQNqknJkJgzf715ojrzP63pqjq2+1ekHXLw2TBKg73sLQUP6q84//f aL0O3P3MGbflp7WYny5KRfi7ppjzspY9hqMaT/uKCxMI1yUPloC/GQwpaQlH/a2SQCjP +FD1W1XHkc1Rnxz/ks//52uFrLpCP+2vLgFLHwUR9upJ2R1YHMu13v+wM3hdlZSSB/Qo +p6g== 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=zWMphmFfDq8OlVxrrPCchY88v/O4bwRw57cpKirymSQ=; b=rYpCDlDGDUfKWa864oN0Mlj59TOvvR5WbgiCnu+hRHhvbifg+heF3DowuLJ/0inYfL ocsKcdxYjpnWqSKJonK0wgnGcUcQbPMOK1DhsxTtwnhDhPvThN11yQzqrMntOojgn4g9 46GP08WrOu3AM4+edtffcCqCPZ3PaPk3hUV0pOJkvUjmSTo60ZJ2/HsEGL+grE3arYMK /21jWpuf2Id0dns7UTiINGflj/5aNON9LUSd//2wKEpE4X0gU7n+Znu8JDHc+peTiJ8I aSe8SN8ls5Ot4QQKsDWnphYQ6hzhpp3YEuDEqCMncv691f6VPmK9LAqZPVXIwo1xTIxC UYrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v9YrdXBB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 ne11-20020a1709077b8b00b00715867834e3si15735589ejc.506.2022.10.19.08.07.25; Wed, 19 Oct 2022 08:08:01 -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=v9YrdXBB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231528AbiJSPEh (ORCPT + 99 others); Wed, 19 Oct 2022 11:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232039AbiJSPEB (ORCPT ); Wed, 19 Oct 2022 11:04:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0088332AB8 for ; Wed, 19 Oct 2022 07:58:34 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191366; 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=zWMphmFfDq8OlVxrrPCchY88v/O4bwRw57cpKirymSQ=; b=v9YrdXBBO/q6meOVsORl10DT9g8/uzZ23xImHaforLllPZJe1CnX//gDt3Ecm5guuqQ/so MACoct9zfApolTJ+v1FVD1h0RLDBoFkoLZNYKGiJ0DsuUqHcw+0rDpb9ZIPgagNu7Zgs+O gkRSYUFmeL4JqdZ1XKjm0OXKoaL+fnuYiiqcJ5sO4+rKUKDp2WLocmXDuVBuX2NTl2a3rl siY+No+tFyVN4CEiREVMo2jTwrxQd9bAZzkxg/EMqT9C3vVARDmTRLPn53t0VEHW9z18bu LhmZykhol1iWGLRrhrVr7+PEuWsHDTLrcyEQ2JthQ9gAU5biH4l812fGFSJhAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191366; 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=zWMphmFfDq8OlVxrrPCchY88v/O4bwRw57cpKirymSQ=; b=Gq8pSMFow1Bxe2k6NvWVnYMVnjoP0hDNZGICKaqxJBt6kO5QnCEPHVFaH8KueqPAfoWClB v8NwqRojtfnaGHCQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Subject: [PATCH printk v2 07/38] um: kmsg_dump: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:29 +0206 Message-Id: <20221019145600.1282823-8-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?1747129028019889672?= X-GMAIL-MSGID: =?utf-8?q?1747129028019889672?= Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- arch/um/kernel/kmsg_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 0224fcb36e22..3a3bbbb22090 100644 --- a/arch/um/kernel/kmsg_dump.c +++ b/arch/um/kernel/kmsg_dump.c @@ -22,8 +22,8 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper, return; for_each_console(con) { - if(strcmp(con->name, "tty") == 0 && - (con->flags & (CON_ENABLED | CON_CONSDEV)) != 0) { + if (strcmp(con->name, "tty") == 0 && + (console_is_enabled(con) || (con->flags & CON_CONSDEV))) { break; } }