From nobody Mon Apr 6 12:13:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7AF9C04A95 for ; Sat, 24 Sep 2022 00:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230325AbiIXAFV (ORCPT ); Fri, 23 Sep 2022 20:05:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232966AbiIXAFE (ORCPT ); Fri, 23 Sep 2022 20:05:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 733F0A00FF for ; Fri, 23 Sep 2022 17:04:58 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1663977897; 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=ANY7oAkpA4R+I+XGrqgPZ6kGY4GmDX82gw1T7525iA0=; b=vWpBFONAv4/pzgToS4exU/1LlRMHRX/eFC/G8EjzVbk4qt7O55zPP8Io1MlY2o43xH3R8N D6Z50QOWAGoucWZdPtuo8K1AMuL5sZhlQAa/VMvKwxwhhgocUt+cago7hmr4f4rmGDcfzx jPP22HktWEsAa7bqYF544nzTaxufQIMMtKLBwgSPJFXjaCkg5TvsmEMGzbyrxRm7ypea5k 7FtE69OsKSIYC2Xt0s95VVphm+cTW0p88tUtctnTKQU7pTDOoiU8ZuNAKxczekEn3C6mqp iXrV30l/xzsujtizv+b/6PV3ysTFoHNcas32lsriZcy/yfxGMsGuOH/x9j9u9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1663977897; 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=ANY7oAkpA4R+I+XGrqgPZ6kGY4GmDX82gw1T7525iA0=; b=8RqLTYIcL6OsOGdep88T4tVlmPLozZRv2jX5XRRZ/CVZtYb+cnuIpqv0gwK5kuXSZ9Fzde pQLdpmU+n6wumFAw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk 03/18] printk: Remove write only variable nr_ext_console_drivers Date: Sat, 24 Sep 2022 02:10:39 +0206 Message-Id: <20220924000454.3319186-4-john.ogness@linutronix.de> In-Reply-To: <20220924000454.3319186-1-john.ogness@linutronix.de> References: <20220924000454.3319186-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Thomas Gleixner Commit a699449bb13b ("printk: refactor and rework printing logic") removed the need for @nr_ext_console_drivers. Remove the unneeded variable. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 14d7d39d118d..d6bba2ea14e8 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -220,9 +220,6 @@ int devkmsg_sysctl_set_loglvl(struct ctl_table *table, = int write, } #endif /* CONFIG_PRINTK && CONFIG_SYSCTL */ =20 -/* Number of registered extended console drivers. */ -static int nr_ext_console_drivers; - /* * Helper macros to handle lockdep when locking/unlocking console_sem. We = use * macros instead of functions so that _RET_IP_ contains useful informatio= n. @@ -3188,9 +3185,6 @@ void register_console(struct console *newcon) console_drivers->next =3D newcon; } =20 - if (newcon->flags & CON_EXTENDED) - nr_ext_console_drivers++; - newcon->dropped =3D 0; if (newcon->flags & CON_PRINTBUFFER) { /* Get a consistent copy of @syslog_seq. */ @@ -3256,9 +3250,6 @@ int unregister_console(struct console *console) if (res) goto out_disable_unlock; =20 - if (console->flags & CON_EXTENDED) - nr_ext_console_drivers--; - /* * If this isn't the last console and it has CON_CONSDEV set, we * need to set it on the next preferred console. --=20 2.30.2