Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp3603829rwn; Sat, 10 Sep 2022 16:00:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+efW3FoYGlvuwChcrIL/yToxn/pDD5pJWBtUCnPoqcZ+XRBFaqpuIySkkZSl7CXFZFPiM X-Received: by 2002:a05:6402:270d:b0:451:4ab2:f68d with SMTP id y13-20020a056402270d00b004514ab2f68dmr3995034edd.31.1662850823371; Sat, 10 Sep 2022 16:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662850823; cv=none; d=google.com; s=arc-20160816; b=n/Lt1nS0dWj5HKnSs1P6beEVUn6JuPzQK+lKP8thl954yaNviIMhm/tgfIr7QsVFuB yslnqa0qR4+cid8/4YlV4Q77zq/pStc+ovNQ+WI39jNnbj0pNqDewfKydiNSipQyRPfZ cr13zpJCuHSi1zLDFqcdVD6MzAjpAcJeYPvqI3HgG9IakfYxnhCl2vwwtT4pfsZDVF8a xp8s0EuFP6vVrzHRcmDv5pQxScw2CqIy9hblnxPF4uONNUYxZeIKPmt0q1aGpnCKoxk4 kPRGQMLPc0wwSCC+hVU03JzHuJ5EZSPK+UF9aTazZdTYRvKjGSaB7fj8yhNNJaeico+I pU4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=3xI7lyIQCW3w0/wiKpLxYgu3oHCXS+iYlZXHschZG0c=; b=DGyp7zK++5UByRKixnfUhReGi7IjAQFLswUgdyGZM9lI9WB+BzHqpQMVgUpOg0CzIp acNayFAJQ+ZZr7g8srV3o9xmLmyhb4HQ698hrlOiQ5ei6Tp7EwkJXgpgPYIz9tLxFV0s RA8csQRaGOvSxoY5rH/7TzKKA91qrnXw8Kup7/5yvcaPmPnRrfy+Zeg7XxPjYgr0/jem XIFwRaSBUoP+hLJRUO1/alTcGAeDKORHslAEcKx5XDUhHfunRNwimLIoJf0M+UGhV+u/ gFCl+dQfOr1s4ApGfhsrUpBKme8y3n4rKK0f4KTj1xCZU5jxUDqzF9gNYfUnBRzBaWqp u5PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sYky9NRu; dkim=neutral (no key) header.i=@linutronix.de header.b=oYwgwlgF; 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 j8-20020a50ed08000000b0044e86981ea9si1052161eds.390.2022.09.10.15.59.59; Sat, 10 Sep 2022 16:00:23 -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=sYky9NRu; dkim=neutral (no key) header.i=@linutronix.de header.b=oYwgwlgF; 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 S230468AbiIJW3F (ORCPT + 99 others); Sat, 10 Sep 2022 18:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbiIJW2S (ORCPT ); Sat, 10 Sep 2022 18:28:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C423043E5D for ; Sat, 10 Sep 2022 15:27:58 -0700 (PDT) Message-ID: <20220910222301.253866623@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1662848875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=3xI7lyIQCW3w0/wiKpLxYgu3oHCXS+iYlZXHschZG0c=; b=sYky9NRuc6BaPd16D3VpHkXEq+HLtuTyCzTHXQ1X3nI69k4aLit51cJY8iZak4x+bR9r+f n5/GJg6eHCYi+NljLg4KBP8ZEuXY5wISyhsZM8HSDkyYpa6ZQYHa8fUrbk0caeFCWSp1bB jEe91ipWNorm1k6p49pdkpvKJAKTpUxSG4XD2PbV1G34R6+4lD9pp2vFtzA8nXZMCpLoSQ nG4AS+i4IAXFEERv3axXTNVpDM80DzTILAwePTDnjFCLBVEDiqZ+8x9P/anu8RqiIX308P tD6UNHIP4nhZ7U6bnuTySqaaobgyGej/bRd6MCwqKvBMFrtnZFN4CkI4FT5QvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1662848875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=3xI7lyIQCW3w0/wiKpLxYgu3oHCXS+iYlZXHschZG0c=; b=oYwgwlgFJkRM9mZRDrIGeoxKs0BKvIQPjFBSxnVsI6CKbrnSLZms1iG/b1MCI8yMbKKQMI 6OhyWfhaPGyskYBQ== From: Thomas Gleixner To: LKML Cc: John Ogness , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Peter Zijlstra , "Paul E. McKenney" , Daniel Vetter , Greg Kroah-Hartman , Helge Deller , Jason Wessel , Daniel Thompson Subject: [patch RFC 15/29] printk: Add struct cons_text_buf References: <20220910221947.171557773@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Sun, 11 Sep 2022 00:27:55 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Create a data structure to replace the open coded seperate buffers for regular and extended formatting. Signed-off-by: Thomas Gleixner --- include/linux/console.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- a/include/linux/console.h +++ b/include/linux/console.h @@ -173,6 +173,20 @@ enum cons_flags { }; /** + * 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 * @write: Write callback to output messages (Optional)