Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2356953lqz; Tue, 2 Apr 2024 15:13:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbRtHFB6oC2zABiDz7s7a/DKkSKCsWK3IzXwvzKK0f+wNqGUcQ9TQ2pJ9eGC7/now3wg6BNXq29QYFDOZK/x7GcXhtdZT73Y5kKJsY6Q== X-Google-Smtp-Source: AGHT+IGU2UoA3sdV7+6+vzMEnxXBD18UWLeH3HyXI3St8LIYynn65Lq5Nh3jaECTpGHWg1kD8Wsn X-Received: by 2002:a05:6214:1651:b0:699:b34:783f with SMTP id f17-20020a056214165100b006990b34783fmr6840554qvw.62.1712096019292; Tue, 02 Apr 2024 15:13:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712096019; cv=pass; d=google.com; s=arc-20160816; b=Pp9kkCQQXUISVCEmtlo+qfwIba9KpBnfU280/PfeiJWWGAk8v9RqXYeCw7ASVB8TAq jUW5/FmZShrtsvTP2RYkKu+wC7ktkqhZOJwsxPB3qo97QS1PYP/BPSvsBSuHCuYMldpK phNBxoj1Iuy1Ck085VGWIOm4SdlW5zBs/8TYJyB6rwLSt0UUEbh66QeX+CRhePQC4v/s 57VFu7aJTTpYhslSWrtR0RmQoqFxCyYChXyK2c1NZcO7fCEr7XXkJUTzIyHMBtddbFpb /PSToN8hA1MPJ94tMWR7wnzzsQ10hclkuMFoPeiC5WPpLfX+iGqNdo2r1ngoliiA6BSP NNFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=0GzrUUzQwt9A0JfUhizcLMvUJMEtY0MSYaFGPPBVIb4=; fh=QIx/VoV8jXft0fDyZG/3ua8wwRcLyG0WwKW/rkgCidY=; b=AZPKhBAeeXENbYx1Vhzap48idvBuCldaVec8v81IlGoKQfAK7VfQKZ2Z1Kgty5CfpI xl8c4W0ILiYInzGO9dwGlBzbi6Ksi3wbF2xZXjbl3kBEjNYIbBIVeYQkSYkGlZRx7lBS FhPL/JMbrjSDLLuppwp1HIdxAAzoEGPhHUDc56GgGhdtM0SB52k4P0DQIA5wvHZtdhLE A5M9NplO6+T2hyqu/Hs+RCOPHzqsFoNBuYRJCWijcaOeifF5umulG9WitqlePEsHbbYj PMQERFwYSgH9rrUqN3ICDUjYDJhszSb8mC0/nF+9/n2zaD7zfycgYK/Eq6WTZMMD70p5 9z1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vIVPjn+w; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f8-20020a0cbec8000000b0069616879b6esi12776428qvj.37.2024.04.02.15.13.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 15:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vIVPjn+w; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 81B401C24360 for ; Tue, 2 Apr 2024 22:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8325115FA9F; Tue, 2 Apr 2024 22:11:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vIVPjn+w"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XpvPlopo" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAAF415F32D for ; Tue, 2 Apr 2024 22:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712095902; cv=none; b=Oezi26pN+FypG3Dqr13ZH4XIKNcdMH9F7TUDmbQ93F0VG/SgJQ4+ELykDN1oKm6iSUfy4wunWymr3xd6vIl+ngi+XTg7vQk4LV18W1dHxYvXK+A916Zm52LbrvAtG8gMZpMK6SH2aFlBlhNfo3ESUIqqd7Q/saA9ShdrVz0mcxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712095902; c=relaxed/simple; bh=qgbf7wzyZyP2i2kvRkavpANgVDXSmqKEab0lXkm1WnQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FsKApNnaNDhXGEIJBS8BHdX/JKPE46nChZHseKdjtLglr751XYBPdcTyf7phVvlRi1I/DGp13PqKm3A7Bw8/dksdzF3FAcYWTo+1T0fJOOgLQodWnUlLu/hr5R+u8XqnWdiESHH/GYrIIUF0stuZtytthdP+amK1cG8C7OkRNfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vIVPjn+w; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XpvPlopo; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712095899; 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=0GzrUUzQwt9A0JfUhizcLMvUJMEtY0MSYaFGPPBVIb4=; b=vIVPjn+wUo/v3OmdzfNEc8Ag3X5youcZKjz9r8Y/LjVq3m4Y7i3BvL4PRSZO4yo6UL+Ixh m39MjS7PH+iWeaL/GePtooNLcgMtMB2QkkkIC8FcutCOP8VUPiirloEzxDSTyrKPUsvkr0 y5tZM0YZLt85/xifyNHMjqoEJMKYrWVG98I67LUC3lrFysZXDqnFH4EC80GlLCqG4/oF56 KZ/HG/U4uT0RePpCAQicDsNOjODdQj0H7urnHscZYaO6rAubFNk83NmFiJ4VzzyEWehxIo tSOTH1/7ybywI3VhYQ6PQES4xJBB4hgkEpqabkshz88Y7kPAvAs5BzUDIzDVlQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712095899; 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=0GzrUUzQwt9A0JfUhizcLMvUJMEtY0MSYaFGPPBVIb4=; b=XpvPlopog8JXD/+Q7a622mIt9ySj1HKTo8ih2revZoWzg48eXZq2jshfDqDkYpa58MaF1b eY+SebAjyO8884AQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH printk v4 10/27] printk: nbcon: Do not rely on proxy headers Date: Wed, 3 Apr 2024 00:17:12 +0206 Message-Id: <20240402221129.2613843-11-john.ogness@linutronix.de> In-Reply-To: <20240402221129.2613843-1-john.ogness@linutronix.de> References: <20240402221129.2613843-1-john.ogness@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The headers kernel.h, serial_core.h, and console.h allow for the definitions of many types and functions from other headers. Rather than relying on these as proxy headers, explicitly include all headers providing needed definitions. Also sort the list alphabetically to be able to easily detect duplicates. Suggested-by: Andy Shevchenko Signed-off-by: John Ogness --- kernel/printk/internal.h | 8 ++++++-- kernel/printk/nbcon.c | 12 +++++++++++- kernel/printk/printk_ringbuffer.h | 2 ++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 4e0edcb3c311..c040fc8f1fd9 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -2,11 +2,12 @@ /* * internal.h - printk internal definitions */ -#include #include -#include "printk_ringbuffer.h" +#include +#include #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL) +struct ctl_table; void __init printk_sysctl_init(void); int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); @@ -43,6 +44,9 @@ enum printk_info_flags { LOG_CONT = 8, /* text is a fragment of a continuation line */ }; +struct printk_ringbuffer; +struct dev_printk_info; + extern struct printk_ringbuffer *prb; __printf(4, 0) diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c index 38328cf0fd5c..1de6062d4ce3 100644 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@ -2,14 +2,24 @@ // Copyright (C) 2022 Linutronix GmbH, John Ogness // Copyright (C) 2022 Intel, Thomas Gleixner -#include +#include #include #include #include +#include #include +#include +#include +#include +#include +#include #include +#include +#include #include +#include #include "internal.h" +#include "printk_ringbuffer.h" /* * Printk console printing implementation for consoles which does not depend * on the legacy style console_lock mechanism. diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h index 52626d0f1fa3..bd2a892deac1 100644 --- a/kernel/printk/printk_ringbuffer.h +++ b/kernel/printk/printk_ringbuffer.h @@ -5,6 +5,8 @@ #include #include +#include +#include /* * Meta information about each stored message. -- 2.39.2