Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp661958rwb; Fri, 7 Oct 2022 02:24:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5XZAMe2+5cJ/y1xl7SwBwP9kMEAYtS1yjCfmx7iid1bDIKUBeYXOPOU3L9Qab+tTzkX2aF X-Received: by 2002:a17:907:a0c6:b0:783:88a3:55a3 with SMTP id hw6-20020a170907a0c600b0078388a355a3mr3332604ejc.648.1665134678680; Fri, 07 Oct 2022 02:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665134678; cv=none; d=google.com; s=arc-20160816; b=02Z9eVFc5loElOVOTBFi8XOzeXJFQgJ7DpAGZgdGtlocKMv5TKGZ4/cw084nfODaAQ HmwdgfCrDW9dT+mWCXr4/7qH3OiYZs6hDcc3z03XJn9/nsKiTuV2w1T8ttnL6qZF/FQx sU1nvw9x5iizpzOg7vYP8umzYMmih3J2NQEbF/EDws7kwCc5RYaOzB50epsCu2diaxN2 Qeqa8kv3WdUCYUtprYIjpjm9fnBFQCysXl54r7mRzB6nfpwGEFFOpuvPzV5RSDyIJUbQ V5eOKxuCV4o096zQMEeREUDQnp/Nw6/WmNGcVXavgBhKK7JvhpLhTF+zvHDLQLk8KT4a JD4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=o5k3b8vGjea3maltVuBt6eUg45yrs+ve9GoN3hFlQf4=; b=lbaQM7qbT6ynUJBI26UPK6nqoVKrlF60grSJZT+lTNS/36++5W1gjtJIATyq1y2pDG GmMmTWBu6A68CmIDTOz/BtDMvnL1qEqiojXBSs0slYVx7ymqkPkThyFRGmV1alqttWMG 5je7dfD9FL/h2N2xvy+OXraVIim0zFGTFHxvkVYi4+s6HlJd4PDqPVdxWxCyNMSaSJYg QYaRMDJ3QGGHtnD8Xv9qogt/ERzH8rTB6lsRF2Ko3gGqBAlmU5vZa2p0AurGUbWlHymk zu05qOw8fwt+Pu9GqTv6uadYxFMEB5dI+cr4tE4zzqpDv6d4UAMdyarKUFFBzgCOwMRM ZTsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Fj4atX2t; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a50ee06000000b00458bbd3a0d2si1463944eds.602.2022.10.07.02.24.13; Fri, 07 Oct 2022 02:24:38 -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=@suse.com header.s=susede1 header.b=Fj4atX2t; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiJGJLs (ORCPT + 99 others); Fri, 7 Oct 2022 05:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbiJGJLp (ORCPT ); Fri, 7 Oct 2022 05:11:45 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43CA8DED0C for ; Fri, 7 Oct 2022 02:11:44 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D67E11F7AB; Fri, 7 Oct 2022 09:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1665133902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o5k3b8vGjea3maltVuBt6eUg45yrs+ve9GoN3hFlQf4=; b=Fj4atX2tHC/HCbl0h/KolgfUhmhJmVVM5/N25X3nGxhVFPSZLQlKu7ZuEGy6p+x2tT9xdl +TWuIgrjtIEHgZs2UD1VC2k9mr5Kl/aRksmt/fTAh4Mm1pPbGhV98IWjgxk1OjoiIYSQhP 0ZXecdHlIaJWbH2YJhGNbrsBItuk+HQ= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8A3C62C143; Fri, 7 Oct 2022 09:11:42 +0000 (UTC) Date: Fri, 7 Oct 2022 11:11:42 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH printk 13/18] printk: Move buffer size defines Message-ID: References: <20220924000454.3319186-1-john.ogness@linutronix.de> <20220924000454.3319186-14-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220924000454.3319186-14-john.ogness@linutronix.de> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 On Sat 2022-09-24 02:10:49, John Ogness wrote: > From: Thomas Gleixner > > Move the buffer size defines to console.h in preparation of adding a buffer > structure. > > Signed-off-by: Thomas Gleixner > Signed-off-by: John Ogness > --- > include/linux/console.h | 14 ++++++++++++++ > include/linux/printk.h | 2 -- > kernel/printk/printk.c | 8 -------- > 3 files changed, 14 insertions(+), 10 deletions(-) > > diff --git a/include/linux/console.h b/include/linux/console.h > index dc0df9d9e7d9..3bb5bc62e154 100644 > --- a/include/linux/console.h > +++ b/include/linux/console.h > @@ -122,6 +122,20 @@ static inline int con_debug_leave(void) > #define CM_ERASE (2) > #define CM_MOVE (3) > > +#ifdef CONFIG_PRINTK > +/* The maximum size of a formatted record (i.e. with prefix added per line) */ > +#define CONSOLE_LOG_MAX 1024 > + > +/* The maximum size for a dropped text message */ > +#define DROPPED_TEXT_MAX 64 > +#else > +#define CONSOLE_LOG_MAX 0 > +#define DROPPED_TEXT_MAX 0 > +#endif > + > +/* The maximum size of an formatted extended record */ > +#define CONSOLE_EXT_LOG_MAX 8192 It seems that all these defines are going to be used only under kernel/printk/. I would prefer to move them into kernel/printk/internal.h or another internal header file there. Any public API can be misused. And these are rather implementation details. Best Regards, Petr