Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1876545lqb; Sun, 26 May 2024 23:39:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKWAFaSeuE0eBBISODoQfRZGwWOMdCk61bhzG5T9Naxx77FT38s41ty+PKEeUlbzQ4WjVI3Sc6UiNO8jjbvbwATsArFRrZ8wJS+S4bKA== X-Google-Smtp-Source: AGHT+IH3YGMXXfLmtRUkeM5To6q11TqUEgdJs02CFSZJc6HIZCFeDXP0oGUCLF4Aee94BZuxmill X-Received: by 2002:a17:907:868c:b0:a62:de58:b350 with SMTP id a640c23a62f3a-a62de58d301mr451832066b.59.1716791998777; Sun, 26 May 2024 23:39:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716791998; cv=pass; d=google.com; s=arc-20160816; b=Dq7lFaEv819EHw6EoIwS6M5fpSLuQnYLJ9Hetf7gVp/8rlvNG55ktGiLffEQNa+6lG JriU5DiTDVtujSoIq6lN0sDV1bcLFCpAEl5PUS4YwvkpFZc+9vtEwNK6/EMBlQe1+UAX +1zlNYIz22a3/I+naioMJid0e1h3i2VViu8101XxRw9Jar6klZpX3F/mJDJKTibpRw2D IV8yTcuTeg+kuI+WRBkX3COs7vj8Krn9Ngb/79wWjHnqIduSVsXt1hCpy+PEM31YQh8t 2mbpYOtuQN/DTJdvvSAEsVlMa/tE5ULcQa16hM8ZZ4OUmxJI/Uv25MBseURfRPUiiTeP 5mBQ== 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=97ofN7IzRf8lwRnx1TzMt6u0N2QRUJRUSz4BCcorVpk=; fh=QIx/VoV8jXft0fDyZG/3ua8wwRcLyG0WwKW/rkgCidY=; b=oxC1kLVW/YrAWoC2g80ysGdV7fKKWGbxqYOZbOKtIvuzP67Rbveqa0yAXszRH283jW aDY1vudCkNCqJyE0FSU6dvanjJZgTsTur4awlAFfkqoEezFwXLcXNK/tnXT8JupRkDOm V4b+mH8y6cWm1ASbkJqUDuongljOujIvTBq1gt0SHKELoxgWakUEqAQL+f8a0Gr0uNNd XZB4WYnp3Ah1K9pLDEtJAo/UcJNRc5l1IUmcLAbt4iTl+qwMVbWjKq7MnL5DU1fftzDu 7YIlUZ0dQPksOK3BX/IL9b1S44XgDaf1pynqDHCTgHokmzYGSvBn5HiFpLXwRMjN0akX DLsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=n6XehCcg; 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-190085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd37a0si360523066b.995.2024.05.26.23.39.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 23:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=n6XehCcg; 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-190085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190085-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7FF381F20CD1 for ; Mon, 27 May 2024 06:39:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DB7D69D2B; Mon, 27 May 2024 06:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n6XehCcg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Q6itJR44" 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 71E26374F1 for ; Mon, 27 May 2024 06:38:23 +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=1716791905; cv=none; b=Z5s5rpjzvhL+OqID/rS6wGJBZ5wQVBbyAed64GnSB9HA3urybjkXxd09XznAUszBEPUClKiiIcOKaOxyn6nwu3Ldm0Galk4kkYSHOMlizJ6mVuv60cM9Xi2nvSwyFDrn1qYTF4tHMSep84Wuh0MNey7lfHq3UPYgfihVDwEN2Ns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716791905; c=relaxed/simple; bh=E2NKGH/rrfyJNZKSY6nFv6k2pt3uU3cBrXrF7Li/rpw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c9rR+PlEZKs54pTBTm85NvS7G9cI5V2kDL0+5lE4ejcHyzNH5JD/eFo+j6dR0PSC9eRTJYo/oc3Gt2lkNM/Im7j/9z6yDtE/3TfKCuFYp3t/LVvc6Dv2uGS82tviLSnR5UrIFltdds1YocTxgWLFacTg7++fjoRMKpawJeVpwPs= 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=n6XehCcg; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Q6itJR44; 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=1716791901; 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=97ofN7IzRf8lwRnx1TzMt6u0N2QRUJRUSz4BCcorVpk=; b=n6XehCcgHhTwjYPGj0PiorRnBHUVBVBIgma4xQzqxFp3Wm8JsAn0F7j7p3L4NYhAFlzjBc ndNkrMmUcR/5tWwoY1xuW/f8la5KRQPm2InZ823ATSo7IJSB6q5psI1/rpPCWebLei9uex d2kIT+yaDxTh6nDwRxdbYalBapfNI8EugCmSZtgHQDtFPP3l6uIWybGbJ/lqEimZdVj73F w7avOxTHYvm1Yq76zTXTOAcGa7uVDKNRNTsDrMWv1z07nvClw3zY2E5+Lm+dyCuip9abLQ vNmJ8LUF8Xw6COGeXXuzoYgbmmeSVMDCUryJShSbVcazwP64GFpRukpWMxsm2g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716791901; 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=97ofN7IzRf8lwRnx1TzMt6u0N2QRUJRUSz4BCcorVpk=; b=Q6itJR44VPnIHYU8OgeS1CY8pCui22eWHBUj3zat0xWfe2BXOq+DFtUaPiQ03KdGCIng94 kdCcgvZA6XE950DQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH printk v6 13/30] printk: nbcon: Do not rely on proxy headers Date: Mon, 27 May 2024 08:43:32 +0206 Message-Id: <20240527063749.391035-14-john.ogness@linutronix.de> In-Reply-To: <20240527063749.391035-1-john.ogness@linutronix.de> References: <20240527063749.391035-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 Reviewed-by: Andy Shevchenko Acked-by: Petr Mladek --- kernel/printk/internal.h | 8 ++++++-- kernel/printk/nbcon.c | 13 ++++++++++++- kernel/printk/printk_ringbuffer.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 831f95f26d48..6c1d01eabf3b 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 1c03508b90f2..5c75ba28e80c 100644 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@ -2,13 +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