From nobody Mon Dec 1 22:03:46 2025 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 A07BA30E85D for ; Thu, 27 Nov 2025 19:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764272683; cv=none; b=gz0ozErqvjoeOhRKnmbgDJvUUz9pxsl9qjutDlnXc5c9Tp9Mu55yvqehte5j/i3wgab6T3OsuUUJtCI7UwGmCiALiuEEHyExSZp4UcRP5Frnar75ifbxQySnzqXy+0q6kAKsRaA2aZKDExTIBNcX9JHBmH13SVYiRo5NeXiLoAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764272683; c=relaxed/simple; bh=kQ/ZP4Rhi9kN8CYBSCrzvJBgX1z6Hg+CrJNhrAGOU2w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GSKokkjeUa51EFb06/0gD8UY2HRxY/Im4EtaNp7VKQx1M0f8hBiBVGpTPKGKBF5VoHwmvMKlwgSVdIWwm16hrsGApsioNAV6p3VDavazt0UroAlHYn1rjqNzxhxJScCn8hmXPpJJKIWGPHDLmIlRGhL2utzgpk3GVLDnH6Oq70w= 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=EiCvrXQA; arc=none smtp.client-ip=209.85.210.169 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="EiCvrXQA" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7b9215e55e6so774717b3a.2 for ; Thu, 27 Nov 2025 11:44:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1764272681; x=1764877481; 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=17S7FXhf8Eq4SJx16F6KnqZFjRLf9iD72lfWcCzgRHo=; b=EiCvrXQA+7zHvAVWfU7dRwj0uo/Yon95XJIzuynzNVgLIBtIXiSBcD9w7r/CwJYTks 172Tk2vDmSUAxmIlLAnYHNYU4bHfwFKFYx+sA9YR9+apI8xW3gfu2QGo6S2fW6ZlDAEw 7Dw0QWDwhOOQz2rUBeD1lbOj+3fRIql+gjIFM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764272681; x=1764877481; 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=17S7FXhf8Eq4SJx16F6KnqZFjRLf9iD72lfWcCzgRHo=; b=WvJkLIN+c4ipcrbsdqGUMcysRN4QcXJ3GJepIa16PmKiUHlb7D0iqhFb4KPmjAMJQv Ip6/vGCgxzaer/RG2E8vRUdAKK92/l1McAZ0y/fFaqexbJ1X6/bmEmhZ2tBvTwAqXLGw YKA/ZJp2mHloty9rytEmx8Ndd6RAtVI6OErZ9iHkZxeCJdzJqnO9a45aA5vCXnhpwlM2 pBN1LEwRabRnZxCJiXIer63Cy8/iU9J9LMpT+NkJ9EfH9X/08gIX+tqbiky5tUDmcTwk cWJq3kmFuL7d/3U7IZ6uNsijhmNbRD5oq1N6TAj/R+dJz3b+Vms1KFJCaimxUAWZnXcU PeMQ== X-Gm-Message-State: AOJu0YyOc1Ak9QzQeXAPEsPmTMqXS6CpbG1enzgBLM7M3qte2JDBM/Ki Rn56acyMoTYpQtVMr0NFCuu8WkBGONgPeFaY4FjbVM5FMxgGaolc5xIRuQ5DmYEoQ1ThDCzx7lU aVHyGOOkZiA== X-Gm-Gg: ASbGncv6H4iBXZ9wCXi78aLpQ6SjUXfNMI4/bV8vzIuQaYhuRz3zJwZEv1Iiuf6+B8y w2/fjiSFagIA1Lz2KPGSr3VLHP2MDK5MuURvdoPgXQSOhquiTO4p/jeNFf7i7dzT2orpc2vCxl+ Y0+zJE2AzhxpZZ13T4TWxVe7HFwZPgDbIumknk9z+VYrztKqv48xiGjnmNT0GAv1jAQAVyP4Mst 6ApuNUE4vyVOFiBQslkV7xNhfJRwyW6XqS85iU2y/vJCbc1TeqwMsL/i4gL6u7keAexNuHLaMUf Zit0HvavcAv0734IPbdDk9e4gsa4AmPsyzMmOto7m7+OZWcAxjiGDMfSYctKzGSBxjkE8lyrClM tS+yOLvp7cp9f/6U5tifudWb4LF/+G6RTd2aH9cZSFfLImppzqfW9DfFYp5ILFBOYIAdVkkBSI0 +wnngGFAOM X-Google-Smtp-Source: AGHT+IHSAjNmD6ZuQMn2D81/dYjnIn34n2KXPcOMp9TqXb+/cA0lnzmDRLwdpLj/PGNvfiOFbi/yEw== X-Received: by 2002:a05:6a20:7d9a:b0:355:1add:c28a with SMTP id adf61e73a8af0-3637daaa245mr13923984637.2.1764272680886; Thu, 27 Nov 2025 11:44:40 -0800 (PST) Received: from localhost ([116.86.198.140]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-be4fb24942dsm2627636a12.6.2025.11.27.11.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 11:44:40 -0800 (PST) Date: Fri, 28 Nov 2025 03:44:38 +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 v8 21/21] 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 5a8c4aca729f..fe16ec6c5af1 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -72,7 +72,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 cb796af0b867..d7c9a2effeb3 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -67,7 +67,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