From nobody Tue Dec 2 02:41:47 2025 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9441366575 for ; Tue, 18 Nov 2025 19:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763492908; cv=none; b=jwK4HNBN69HojTXRaIwyvogYeR9iBEfKehuSu9VXYKr5+qqA/6E75vpnaooUMbWysTYkm54h0UJSlbsLkCX+RUrq5gTIFEDMjxH5BhtN73ED2TPo2ywhmpLufM6DOej22tx3IKpnpWDTETeeXSorfgQMlwQwhYmapAdqbNxWvAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763492908; c=relaxed/simple; bh=c9vD0SvDt7Y9IDAUvCmtbGWC/AO0DBknWIdg3C7yNZY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rVzbpq+U0IxjCW1piXUdXIQfAWM7oV+sf8HvPk2N5juJ0CA70AgdzV3dYgfLBeL6NCD2kw95ywM9m7lTfVf0voEnUy2jUJiO03lb9onIGshCgiURepgyGuBOqTw2OHY4ZpdjVeYWff/o23c9UbZ5i84pYOyC2BG4zgQBk66Ii8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b=mVlKC8em; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="mVlKC8em" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-29806bd47b5so37794745ad.3 for ; Tue, 18 Nov 2025 11:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1763492906; x=1764097706; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=sRNnypcEFsiD57ue+ARqdr8/hiSyVS3dM000M+doBjA=; b=mVlKC8emFy79pfl0ESJB9y2EW+8FhTOKiyfUrthkW8F1x649rEObhWy8YBACzDe4eg BcLe6pe/gjLhXPrDcMP7YmuN8MOPibedJGsBgGhJyY2xTTalu4F+oozNyTfMrr3Q6NwZ SrwBX6Off4BrZJX0537Yhxn2cPSN8gGmei6J0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763492906; x=1764097706; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sRNnypcEFsiD57ue+ARqdr8/hiSyVS3dM000M+doBjA=; b=w0MO3Cu3m26lSX9XeGpPUZlA12HlYmIvmmmtkf+OHurACO0x5Uu86oExNpq9S0xD4q uAdE4rRDsrqe8a2zlhAgjea/e9jPU/wVwPCq0Ax6TxRaWrzVIOcO3Ze4kbvN9x8AWPGJ LSbHB46qTONgVajYAlzVwNTotq+ovTtu3DjaSBxKtlt5rAOsNDI8Tj/BubaqX/Q/JjfQ 7z7pG9Mfu2qg58dQDP+eBCIXfqtuXIdiYhPvnFMBwt/LcpmUqjDeeOB+otLZlXJD0u4g +PQY0ipao3L5PceMDjhWGAxHCSCQVTMiMRI1DjDdb8WY1HHnlmTgwlo3Ib9hpDqmme7W GX1w== X-Gm-Message-State: AOJu0YxOLF6VzHWIJGsrB7bJR3ucyPbJaYZstj+i51hAvzksc0nADAc+ rm2OuCAWAxk+HsCEUFJuCh56fqYyB9b9a6V1JZ7YuGg4wJaiKBAZANL9E0tWAYnmHzA= X-Gm-Gg: ASbGncsdJNhUYjibBPHTnqKcM3mdlHZrg5h8UaZcur5b4w1lmsGNjAGAy0+QRSUv8Wk X0ppnuL7NdyZ56aKgVTmUd7DlQ86rNy+nvQ25Eu68WwQpg8w5QZMtPYxyMhbQZsORy/63YgUICw TuZblk1QiErwnOgm+2iIKs7sSMu8GpQ1NBNTWsQK3deAk4dIi/Y8ZuWq0KhE0oIfbkKpO+D0VVx oKnSUov6h47Ta6avC4iRhji69113bbFl6zmCCF8VgcSTFkJL2niD7CVj3xG7/R9tMFOCrVyy96J R6I0Wfh02sfBhFgLB97QxpYKtI5CoLsInXfLwo6kvoGpBFnaRmrmSa6Ehsj3TfIobbzJLgqbOcw wi8iztLwJPgSZeIhLQV1jWBfswa3OYBWDIOufgj/dpj8C7EWubZr68OVpekDCQHohy3Se4jAxKy 9szenSVC8q X-Google-Smtp-Source: AGHT+IGBN+6PyP7dyDOUUS1Zs/ob8ywMSavQn9AOvqOE+fUv9Y31ruO+uVtGMn+7pjVWox0aCF2sEA== X-Received: by 2002:a17:903:230a:b0:295:94e1:91da with SMTP id d9443c01a7336-2986a73b093mr209729285ad.33.1763492906273; Tue, 18 Nov 2025 11:08:26 -0800 (PST) Received: from localhost ([116.86.198.140]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2985c2b0710sm181768085ad.66.2025.11.18.11.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 11:08:25 -0800 (PST) Date: Wed, 19 Nov 2025 03:08:23 +0800 From: Chris Down To: Petr Mladek Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Sergey Senozhatsky , Steven Rostedt , John Ogness , Geert Uytterhoeven , Tony Lindgren , kernel-team@fb.com Subject: [PATCH v7 13/13] printk: Purge default_console_loglevel Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.15 (2b349c5e) (2025-10-02) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" default_console_loglevel (then DEFAULT_LOGLEVEL) was created in Linux 0.99.13 (September 1993) to power what we now call SYSLOG_ACTION_CONSOLE_{ON,OFF}. It was originally hardcoded to 7. In Linux 2.3.12 (March 1997), Chris Horn made it configurable by sysctl through kernel.printk. Its demise came about in July 2009 in commit 1aaad49e856c ("printk: Restore previous console_loglevel when re-enabling logging"), which replaces default_console_loglevel with the previously used console_loglevel. However, the documentation was never updated, and we still kept on telling users that this sets the default value for console_loglevel, even though this hasn't been true for over 15 years. Purge both the documentation and all remaining references to default_console_loglevel. It will still be initialised in the sysctl array. Reviewed-by: Petr Mladek Signed-off-by: Chris Down --- Documentation/admin-guide/sysctl/kernel.rst | 5 ++--- include/linux/printk.h | 1 - kernel/printk/printk.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/ad= min-guide/sysctl/kernel.rst index 5ac6db03c2fb..37f2f417eaf7 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -1100,8 +1100,8 @@ This sysctl is deprecated and will be removed in futu= re. Please consider using ``kernel.console_loglevel`` or ``kernel.default_message_loglevel`` instead. =20 The four values in printk denote: ``console_loglevel``, -``default_message_loglevel``, ``minimum_console_loglevel`` and -``default_console_loglevel`` respectively. +``default_message_loglevel``, ``minimum_console_loglevel`` and an unused l= egacy +value respectively. =20 These values influence printk() behavior when printing or logging error messages. @@ -1113,7 +1113,6 @@ default_message_loglevel messages without an explicit= priority will be printed with this priority minimum_console_loglevel minimum (highest) value to which console_loglevel can be set -default_console_loglevel default value for console_loglevel =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 =20 diff --git a/include/linux/printk.h b/include/linux/printk.h index e36cae1805b2..432bef48e212 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -71,7 +71,6 @@ extern int console_printk[]; #define console_loglevel (console_printk[0]) #define default_message_loglevel (console_printk[1]) #define minimum_console_loglevel (console_printk[2]) -#define default_console_loglevel (console_printk[3]) =20 extern bool ignore_per_console_loglevel; =20 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a6e1fa924294..170fa8e14ea9 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -66,7 +66,7 @@ int console_printk[4] =3D { CONSOLE_LOGLEVEL_DEFAULT, /* console_loglevel */ MESSAGE_LOGLEVEL_DEFAULT, /* default_message_loglevel */ CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */ - CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */ + /* legacy default console loglevel, unused */ }; EXPORT_SYMBOL_GPL(console_printk); =20 --=20 2.51.2