Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8084475rwb; Wed, 23 Nov 2022 15:21:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dYgV42B/mkpJaKwdMXcVzHQtxnZ2WJtgh/DmOUsoHgCg7oMOOb2V8bN8JhK6U5mVJjRFw X-Received: by 2002:a17:906:ad87:b0:774:ade6:ce3f with SMTP id la7-20020a170906ad8700b00774ade6ce3fmr25531384ejb.624.1669245707058; Wed, 23 Nov 2022 15:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669245707; cv=none; d=google.com; s=arc-20160816; b=OSeAVjyvuqBH7nkAwXi3i/W62TzSnumAr4PSuOWI1PEKcl2dXnhifibuc4pL4jiDPw fJFANn7BwTFE+crmm5DIS2oOLVhHu6qS1PJZ315ltR3/QPmqOf+hFWZMn56AlYTyfqb1 BnQEbBBnmHtrS6w7aBT3tPwSso0NT4DgZGYDVRzwWAND8YvmUchzuXPhBq8kfNWtVWU9 bJNRC/nrHUf5iE56i463bpn31xh+TDWKYcl87+lwKmF9MX6KH+ga2k5I/LCYLSFDr3rF 0Y5GC5ML+RoEXQ+CvYFc3JWDAoXj70aXPpBoxqOCqX1vD0vWIz9dKrjCXaORWTz7TQ0g n26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=aHekk7rHrVj5L5T/94RT0HyGLRna0DzwZs8ha+Ccyvw=; b=hejo9BOiV+tYa8RPTS8F55yY7rYy/auh3AwEInuA4+Ixv1cr/TXHtbYL3kQtyBhnuW nirS0imgALS4KJw8w34m+xuikr41qq/7IJh4+Igo9JlJtjl3M/P46U4c8U0nLeYtefh0 kGj4MZGoqvISFMeY5jTPY4R7IYqNEVzVMuQpcDyFO8A5FNgSjLb2qfvUhsDnXiEx9DXn l7gn39Qj2dbhBixJDbqvG/FLukoa5NfmmFi2Hjsr6JsdZ6rWj17dctQbCBRF0VQYJvWt gxePOGHGg8yamuexEo46n8fybblnUrcf0UxQHoWxpEWAw7Bn3UBh7oBYWqGxFS+6HxEP AcnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rUgi9ajh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2GHZKoSr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020aa7d8da000000b00448b88378f8si579000eds.359.2022.11.23.15.21.26; Wed, 23 Nov 2022 15:21:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rUgi9ajh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2GHZKoSr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbiKWXOb (ORCPT + 88 others); Wed, 23 Nov 2022 18:14:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbiKWXOQ (ORCPT ); Wed, 23 Nov 2022 18:14:16 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7136BDEE for ; Wed, 23 Nov 2022 15:14:15 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669245253; 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=aHekk7rHrVj5L5T/94RT0HyGLRna0DzwZs8ha+Ccyvw=; b=rUgi9ajh583f3DafswGx6DnJgtX1nVcRAI0OyvdmARANW4/vl6t1tWVQkHydEMakuWWC11 USYMG+Gs8LFd4tcL6UReH+pZX4mBlHObcxMHf+AKL9UvcdGeq2e4uRKAyK3le2jXCfAyts n+ppQ+9SW7jvNmqXyvoh7/2iWz/RAsfVn06Qu+ag4MlIBbVKOFMMx4XUWSPL24cMJhemaG KDXxrR6MbH+huS7Ii4ul3e2XVCASSvMolb6UQO103ehl3MO+mKu5qQCgzzgM2anf/BKsWW YlLxKESOAulXbigFgHDL6LRpLI/6nlI5QTGHxhVtPG9bqEfXBWEvBZnAfNkWtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669245253; 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=aHekk7rHrVj5L5T/94RT0HyGLRna0DzwZs8ha+Ccyvw=; b=2GHZKoSrpfphmj+qCrBjg2+U05bc9CFtPkG0ZSPQaa+D8zKrUOuD28SZDr66qVARIhuUIb dM9dzZOLn74ztsCw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk v2 4/7] printk: Add struct console_buffers Date: Thu, 24 Nov 2022 00:19:57 +0106 Message-Id: <20221123231400.614679-5-john.ogness@linutronix.de> In-Reply-To: <20221123231400.614679-1-john.ogness@linutronix.de> References: <20221123231400.614679-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner Create a data structure to replace the open coded separate buffers for regular, extended, and dropped message formatting. A separate @ext_text buffer is needed because info_print_ext_header() and msg_print_ext_body() are not able to add the needed extra information in-place. @ext_text can be used for dropped text because they are never used at the same time. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness --- include/linux/console.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/console.h b/include/linux/console.h index b2cf256c23b6..641c1ca7fb67 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -178,6 +178,16 @@ enum cons_flags { CON_EXTENDED = BIT(6), }; +/** + * struct console_buffers - console output text buffers + * @ext_text: Buffer for extended log format or dropped text + * @text: Buffer for ringbuffer text + */ +struct console_buffers { + char ext_text[CONSOLE_EXT_LOG_MAX]; + char text[CONSOLE_LOG_MAX]; +}; + /** * struct console - The console descriptor structure * @name: The name of the console driver -- 2.30.2