Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1691571rwb; Fri, 23 Sep 2022 17:20:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VnASl090PpjhfrWc1XzT5uFCIZQvIZJD+RcihnWVDVy5IL3mFFHYcLbXldH3ZZ51WG6Fd X-Received: by 2002:a17:907:2e02:b0:77c:405e:e740 with SMTP id ig2-20020a1709072e0200b0077c405ee740mr8654733ejc.139.1663978858576; Fri, 23 Sep 2022 17:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663978858; cv=none; d=google.com; s=arc-20160816; b=aBbE0NMZD0KT7+NUKW1F78FOWsD825G2jyxhZA2LBvpjwPVUZc6AqO6o5bfHRt26tt 0QXofhw7UUq7c/MN0Sv7PlA6et6icCDJAPlmadQieAeGK8AQuJ3JzkRYkjC6Z0ZDkDSO ryMOqWlq7QK0cC05UYLnQ9/2diSmGBYrtKXxg+rCLt1MpTlR/vvweSpDnad+24PS85ZE 96uP/lL9/qsUV2VUI5VqXUh65A7QqAdAbZcV+evLwuiL11Nh7vF/tHdabv1k3nxmRw+c 0S9a87EkKN2YuDWqyHdbbtB2P7uYypEcF7IDiYDZrE7ujucNHMnZBsdfaeXMmD8e8poe bINw== 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=5h7zixATd3WpCb7P+Y08NqGrb+Fb5oQOQ9ihWYJOO5k=; b=VuvOeaaoNoOwOU09yaVYW1ZhqsQ8RA3FMnEV6klSiGkqDiFysa5+bkcRbP4UFRAnVf /DJXZnruqjDbJHWWl8KCXQehAJ8rR7DkcMwqCFQHp03q3/bz8YSFyHgh8nP0bPnl1OlS dPgPJPCEn8snIwOlUVQGPccLE65J/EVJuXTocuuvvajBNfZDqpo1w0SxOZzS+UO5d09v EL/3mpmSPq9th32Cz1H9n5WIWzOs0/gL2zLCqOaz3Wu7+NyGASNz4iStCS1xRppicsCf AR59v6xowivIlmGqZiYVhsgokiYZ/vKdZbald+ogaWJ8Z/+WaIcgrsRLQw0Qs4qgJUam +T0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H17dFKuK; dkim=neutral (no key) header.i=@linutronix.de; 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 c11-20020a056402120b00b00453b502b409si8159977edw.559.2022.09.23.17.20.31; Fri, 23 Sep 2022 17:20:58 -0700 (PDT) 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=H17dFKuK; dkim=neutral (no key) header.i=@linutronix.de; 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 S233143AbiIXAGO (ORCPT + 99 others); Fri, 23 Sep 2022 20:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233017AbiIXAFN (ORCPT ); Fri, 23 Sep 2022 20:05:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16409105D5B for ; Fri, 23 Sep 2022 17:05:12 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1663977905; 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=5h7zixATd3WpCb7P+Y08NqGrb+Fb5oQOQ9ihWYJOO5k=; b=H17dFKuKhT9Lp9Q4+/UbrwIXCcApT4fvLMAxpq7EnVbGkimHzqBWkAKTBRAJum7YnMSxHG vhyYuDgrXdAmAL6mbvbq4t+x9A5l1Rtpm/nJ8Q8DTNRzmxoBWH1HuOTHOytOLdYsv44x+Y a2Em3tJjbiOgpRVZUNU+R25WG2UYcLhRSNnmRVqsjU2I4ehQo307+mjJiF4utT5UZcA9sQ fRqapy9yhDlhvJudHV2GLqCfX8pTXOVhmBwFZ4rh08QT216Z4jvGZgbgZYD31BNCYf++na qQc8C+tajmDQwze4hE/17DUb/HH1utNuhjF1AmnTzIH7oCa2cGBQyaM35ILylw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1663977905; 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=5h7zixATd3WpCb7P+Y08NqGrb+Fb5oQOQ9ihWYJOO5k=; b=L9VjFKU9GQuqZI2R+r4dxWI8JAmys1BTBglboFPZzTbZiSK3oWd9Ex3t7rBSwM2vVenTkI C6Vp9viA8gKQO5DQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk 15/18] printk: Add struct cons_text_buf Date: Sat, 24 Sep 2022 02:10:51 +0206 Message-Id: <20220924000454.3319186-16-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: 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 and extended formatting. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness --- include/linux/console.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/console.h b/include/linux/console.h index 8ec24fe097d3..05c7325e98f9 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -173,6 +173,20 @@ enum cons_flags { CON_EXTENDED = BIT(6), }; +/** + * struct cons_text_buf - console output text buffer + * @ext_text: Buffer for extended log format text + * @dropped_text: Buffer for dropped text + * @text: Buffer for ringbuffer text + */ +struct cons_text_buf { + union { + char ext_text[CONSOLE_EXT_LOG_MAX]; + char dropped_text[DROPPED_TEXT_MAX]; + }; + char text[CONSOLE_LOG_MAX]; +}; + /** * struct console - The console descriptor structure * @name: The name of the console driver -- 2.30.2