From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, BUG6152_INVALID_DATE_TZ_ABSURD,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE636C4361B for ; Mon, 7 Dec 2020 22:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 926062396F for ; Mon, 7 Dec 2020 22:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727995AbgLGWVF (ORCPT ); Mon, 7 Dec 2020 17:21:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbgLGWVE (ORCPT ); Mon, 7 Dec 2020 17:21:04 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A60C061794 for ; Mon, 7 Dec 2020 14:20:24 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607379622; 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=HEtwlBL3OabOsivJm+dXOlC1opmXjQgDDvJiFstypec=; b=ekGrrMirk4xWdKyu0SupX6IXYEy4WZqQPuwp5XuFvVVXCpskGheJGipkE7QyqoQWA/EjWz FCCNaUlK8elVLgMbHAGFdP7mBET8wRhZ6u6kuO2ih/3nbxYF/T4/Wsi3iJbb05q5kpArZH rngsomqPD+iUe904xuZwlKEZ04Z4wa/4bLp2AH8z2o2+i6adUeTnihwpL9InXVcDcMgZK9 axkPUEkqZP05qQYi39C/uqq6UViuhyZee4YEiTA4UKCV6GzBL1vqgwynKcEtgFvfExZWWO vLGf5/7Z3xlook8fsFAoGlk5Z8gHv3jfyztPO1Z89hzDFLXiMhz3NXfA1Cir5A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607379622; 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=HEtwlBL3OabOsivJm+dXOlC1opmXjQgDDvJiFstypec=; b=bzRuDiEmNJ5avFk7RrQhrS3KyrUJAcZd2/dcthtVLKu1i6GgrVv2sEDTd5Ku0HQ2nxy4uI pjDNoqiXTxrqXuAw== To: Petr Mladek Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH next v3 2/3] printk: define CONSOLE_LOG_MAX in printk.h Date: Mon, 7 Dec 2020 23:26:19 +0106 Message-Id: <20201207222020.2923-3-john.ogness@linutronix.de> In-Reply-To: <20201207222020.2923-1-john.ogness@linutronix.de> References: <20201207222020.2923-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CONSOLE_EXT_LOG_MAX for extended console messages is already defined in printk.h. Define CONSOLE_LOG_MAX there as well so that future changes can make use of the constant for non-extended console messages. Signed-off-by: John Ogness --- include/linux/printk.h | 1 + kernel/printk/printk.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index fe7eb2351610..6d8f844bfdff 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -45,6 +45,7 @@ static inline const char *printk_skip_headers(const char *buffer) } #define CONSOLE_EXT_LOG_MAX 8192 +#define CONSOLE_LOG_MAX 1024 /* printk's without a loglevel use this.. */ #define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index bf5fd2be3a05..e1f068677a74 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -410,7 +410,7 @@ static u64 clear_seq; #else #define PREFIX_MAX 32 #endif -#define LOG_LINE_MAX (1024 - PREFIX_MAX) +#define LOG_LINE_MAX (CONSOLE_LOG_MAX - PREFIX_MAX) #define LOG_LEVEL(v) ((v) & 0x07) #define LOG_FACILITY(v) ((v) >> 3 & 0xff) -- 2.20.1