Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2747864rwi; Fri, 21 Oct 2022 07:29:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4qsJ2dMS6pyu+zK8zQvZpg6R1k6DgJfN9bdIpeB3P5k9Sqj40FlBV/v9m7ktZxrkKBOLoq X-Received: by 2002:a17:902:b089:b0:178:54cf:d692 with SMTP id p9-20020a170902b08900b0017854cfd692mr19363251plr.1.1666362559888; Fri, 21 Oct 2022 07:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666362559; cv=none; d=google.com; s=arc-20160816; b=YDkG1whRryO2jGQ9F7IudEWwka29KM8XogCvPMSO+iaBXZAjMXYhKYDBKH6CwnQE/8 YkpiY36c1mBTd+Fz8Xfhfu3kK/yle0OKwYxNu1HYmOJ8UvzSyjiSKfufRjErHzO9B0J4 QJKbgbLZNSnwN7s7KhGLDeMAV02XJCnNlmkUV0g/eHW2PWiMWquvxK+cfJSPBiGM0VEr C49nKNOzTNHegEAYwSPTS/DzoMS5Qyiy9JYA2oUijKyLmeXt8aoHLXWRq8IKjN9gdRcS CmEmFHguqIjPHLMGqD52Q/lrt4Mms6qPmTsZG4zgrEUL89mchpRLXo/63OOQXISY9EKw hMRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1VumRopmkMGi42CeTbKazupolMyzZhURL00ZfaW4xkE=; b=nd5AWF+Iyzwt06LJGwdtcfNlCaywYZZR4qFVg4cH8x5Ysh0uruqtP+i7tgRZRUzvjd 3BPIRDwDr7hJjTAdWn0GMkP6u2ExicNUtl1tHZSRFOobmtTlsS8AktRjWkaIrFJ7trGQ zLscRCk/adYKA9Uu9rBRJRsHQI8u4BTkEEhMI+Aedx51Iq6mLeiHXuqW8Z8msgbIMQJV hQ0qf3AxglklIlXZcZaf82bxAk2uF3+oQPFOmzB/7Hg59Kh0KpiPEvHAmqNmtyRq6ooz +rmgVdRi4xo0EnhQEbhYxtkAf4JOhodI/ox22TI3QKoCaAu+RJkKNa+kkvFInqmwvvbX u7NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gdVZ4fSv; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a17090ab11400b00212ce534ef7si2193524pjq.22.2022.10.21.07.29.07; Fri, 21 Oct 2022 07:29:19 -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=@suse.com header.s=susede1 header.b=gdVZ4fSv; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbiJUNWX (ORCPT + 99 others); Fri, 21 Oct 2022 09:22:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbiJUNWU (ORCPT ); Fri, 21 Oct 2022 09:22:20 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD342475DA for ; Fri, 21 Oct 2022 06:22:19 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1B17C219C9; Fri, 21 Oct 2022 13:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1666358538; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1VumRopmkMGi42CeTbKazupolMyzZhURL00ZfaW4xkE=; b=gdVZ4fSvrckrlGvFlTSb40MpTj1ZsqvTB7WK7LgbNOk+VtT8zH0CiWHKKRfqD+Tclsv4xI 0mEmRZ+ChIZ5Pf66NbeD2oaws4fTZkCO4EnKliGVzXJrofHQZ2xuUYdxuikY3XaH2JhyLq GrpRfBiRz1oFHrjEoTuYOhMVYh3Jd+o= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id BEB062C141; Fri, 21 Oct 2022 13:22:17 +0000 (UTC) Date: Fri, 21 Oct 2022 15:22:17 +0200 From: Petr Mladek To: John Ogness 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: Re: [PATCH printk v2 10/38] tty: hvc: use console_is_enabled() Message-ID: References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-11-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221019145600.1282823-11-john.ogness@linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 On Wed 2022-10-19 17:01:32, John Ogness wrote: > Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). > > Signed-off-by: John Ogness > --- > 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; The check is not reliable. The console might be disabled even when it is already registered. I would be nice to fix this. But it might be done later. Feel free to use: Reviewed-by: Petr Mladek > > /* If this index is what the user requested, then register Best Regards, Petr