Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1425425lqm; Thu, 2 May 2024 14:40:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXw2xSOJHZIau67HHdjil2WwyYDlVuBoMa0A3M5OMcuBeUfbWilpc/ktGc5OFZDUhCk2hna9MN7VgSo+2+Xv91nQzfQ/d/K9rP6ufjTMQ== X-Google-Smtp-Source: AGHT+IGbPvaqNAqdKF6q4QYPsWQg8KrdN4aF8z3ufWTLBy2hU1S9LbfX0vHrLG55UcCd9AcwOClU X-Received: by 2002:a17:907:766f:b0:a58:c0e2:9792 with SMTP id kk15-20020a170907766f00b00a58c0e29792mr337689ejc.61.1714686049905; Thu, 02 May 2024 14:40:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714686049; cv=pass; d=google.com; s=arc-20160816; b=psNy0KqGBN2aJ/aC+qaGlTyJXd5O4qcZRMbvlhs3UEldKKh7VOAv7cCK3mJjXXxL6U NeeirES8BYC1gAlLfe+m2qWqd8g97GHe8dygdSG+r2l5jUh3cv7CmwQIlI3yHTB47Pio R/AVloQLia7HyZ+bA598ejIBLDof+hOXr77cPdHYu9makSkDrJPUp5fQQeQSzHELTAgK j/YU4L0tt6jZeSx5qkD4xVXjydcdsq6Z5Dg0D/NOZ9E5bXNA8ge+eBxf9x4/bjt3QrTh lZyuXpxxlGIBpY9W193l51+AUNkUpsH8WFsTmfe3QhT+cbN72i3s75IT5PYN/toQFuLJ agKg== 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=Kjjk2yQaSdehlXyvncmPkRMwdSdvenQb1yl20R7F0SU=; fh=QIx/VoV8jXft0fDyZG/3ua8wwRcLyG0WwKW/rkgCidY=; b=kmgPFnstfk9Y+lrlTQ8weWqWzqNeF0LvOuWnMVRRX+xtwXB1OfYuKJdxhEDA/zmQ0R 8ByXLUDsXv67dIaqaJCM6HVe+U5GhUTRwWwveYPhHQ5IW3sgJrI8pc9I3cv8BawKUhuQ zTnQv+gbrckghn/E5xO+KWKp/2JneqdY6Nv8tY45SQug6S+GcT0RV+xr4RRXGHNavlh+ c6W0tYHhAbSEaCI2moa+kq5voLFr48p+l7o/3YCWbLYMf+WNV34jsS/F8XCD+V8/0izz np1YDP9HVE1sqRSvN50wb2erIkmjLjU9nXzPDXaf4I5WUkw/ZWwaYIhBRhYlES/hPgk1 4+Zw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gPA1Cq3r; 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-166964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166964-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. [147.75.80.249]) by mx.google.com with ESMTPS id k4-20020a170906680400b00a54f054f523si869957ejr.876.2024.05.02.14.40.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:40:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gPA1Cq3r; 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-166964-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166964-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 A2B751F212B1 for ; Thu, 2 May 2024 21:40:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03DF21C8FA5; Thu, 2 May 2024 21:38:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gPA1Cq3r"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="koZ+HFiw" 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 3E0B71C0DFD for ; Thu, 2 May 2024 21:38:50 +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=1714685932; cv=none; b=rHRKszkuiTlr9agAGCfX6Vwio8UFsG2Upcj59tfGlsGw0d44/SXujelKjAMEiu5GUQlrU5TF/czyIY9ssSw9kspM9ZqYFbcn96lyaUVYYVw/Zl60ru6mNERD7s0Xj4iOSGFJcKwH1MpzSlrI8AIW6BonJCqlEvMER3w1MIhek0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714685932; c=relaxed/simple; bh=iA960+saI7gEnS5x6t8Ea+sjaf4rVAr0JyKNQ+CNr70=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sjXuFtIby3B68wcCjlBB+le4ioGPtsaUtvGhjrtbJc4WFPbSb22FrdZZgOvVvBv86yW8wtHBl8UAu1pxbC3xJaHESv5rf6fxbfeRvH37PR054ATeRC+zdfT5uXQRO6hrW0ZbcR2dTStVdPV4M4Uven9r8tpje4bY9vVIEHXz6lE= 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=gPA1Cq3r; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=koZ+HFiw; 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=1714685929; 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=Kjjk2yQaSdehlXyvncmPkRMwdSdvenQb1yl20R7F0SU=; b=gPA1Cq3rEIMA5tnEYeFbB62YkV2ult4GYTqdUgk53OYwzbuS08LNmNTf4AWFxBZCrWhjom o1UYAkTlZp0WdoAhhhHjimhf42Pu0CzF886MHtY6YqbJnAlUDJkZOVGEZT20M6n1UjbA01 K/nSH7VZF2PqEAB8c3ZJ1ojcYLrq2Zn1HXLdArxHv6RiLfIBmk60/E7uB77O61LPCexmBK pBJRLz7EYscAfO4/g3JsbGTyi5i4gIb3ZIcDw+Ee3UsgxZKg2YdyXWpuSRyN9gC9z6j2I3 rgYgxHM1WclrJ5MLbPukCe1Ws0gygyuZutmoYejkTnlS3aghVirNUoS5/YJzFg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714685929; 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=Kjjk2yQaSdehlXyvncmPkRMwdSdvenQb1yl20R7F0SU=; b=koZ+HFiwRQvRSIg5gSD7BWhXo8357rjtQVzyhs6tCj6Djvs29yhCVQkBmTitQJPhg6ZViY rGiH2fgaAr4Nz9DA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH printk v5 13/30] printk: nbcon: Do not rely on proxy headers Date: Thu, 2 May 2024 23:44:22 +0206 Message-Id: <20240502213839.376636-14-john.ogness@linutronix.de> In-Reply-To: <20240502213839.376636-1-john.ogness@linutronix.de> References: <20240502213839.376636-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 b8a7e3e136d3..c429f4cfbb2d 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