From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAE35C388F7 for ; Thu, 22 Oct 2020 13:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D142222E9 for ; Thu, 22 Oct 2020 13:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2900428AbgJVNpQ (ORCPT ); Thu, 22 Oct 2020 09:45:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:59920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2508274AbgJVNpQ (ORCPT ); Thu, 22 Oct 2020 09:45:16 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 620CE20BED; Thu, 22 Oct 2020 13:45:14 +0000 (UTC) Date: Thu, 22 Oct 2020 09:45:12 -0400 From: Steven Rostedt To: Petr Mladek Cc: Sergey Senozhatsky , John Ogness , Linus Torvalds , Guenter Roeck , Shreyas Joshi , shreyasjoshi15@gmail.com, Greg Kroah-Hartman , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [RFC 1/2] printk: Add kernel parameter: mute_console Message-ID: <20201022094512.37c9bf5d@gandalf.local.home> In-Reply-To: <20201022114228.9098-2-pmladek@suse.com> References: <20201022114228.9098-1-pmladek@suse.com> <20201022114228.9098-2-pmladek@suse.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Oct 2020 13:42:27 +0200 Petr Mladek wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index fe64a49344bf..63fb96630767 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1207,6 +1207,19 @@ void __init setup_log_buf(int early) > memblock_free(__pa(new_log_buf), new_log_buf_len); > } > > +static bool mute_console; > + > +static int __init mute_console_setup(char *str) > +{ > + mute_console = true; > + pr_info("All consoles muted.\n"); > + > + return 0; > +} > + > +early_param("mute_console", mute_console_setup); > +module_param(mute_console, bool, 0644); > + Why have both early_param and module_param? What's the purpose of module_param? Usually that's there to just set a variable, without a need for another interface. But if you have early_param() that sets mute_console, isn't that redundant? -- Steve