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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,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 3DA60C2B9F8 for ; Tue, 25 May 2021 10:35:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16617613F4 for ; Tue, 25 May 2021 10:35:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231810AbhEYKgu (ORCPT ); Tue, 25 May 2021 06:36:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:46490 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232213AbhEYKfD (ORCPT ); Tue, 25 May 2021 06:35:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1621938813; 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=jaenNB/41FI7l1H6eXnKw5fm7YclHhGbzv0v463POLI=; b=kkDe7Sfv7/6so47rMx6o10QPDvBPQpt5UYFPWct54RvNJ//CLu0jlzsb1sEI+mNWJJudow e29tg81xRFRrJpnc0kaXT/VsQ/6gzgIGcOY1b9Tt1YJN0Gy8MQlwgFCZ0Nr/9Ew3T9vVOT C7SH2gxt39xJOVEcO26p7s0BFqQWNdY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 81314AF09; Tue, 25 May 2021 10:33:33 +0000 (UTC) Date: Tue, 25 May 2021 12:33:33 +0200 From: Petr Mladek To: Chris Down Cc: linux-kernel@vger.kernel.org, Jessica Yu , Sergey Senozhatsky , John Ogness , Steven Rostedt , Greg Kroah-Hartman , Johannes Weiner , Kees Cook , Andy Shevchenko , Rasmus Villemoes , kernel-team@fb.com Subject: Re: [PATCH v6 2/4] printk: Straighten out log_flags into printk_info_flags Message-ID: References: <0b4f0e60960217ac36462316cf43497a9fad1747.1621338324.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0b4f0e60960217ac36462316cf43497a9fad1747.1621338324.git.chris@chrisdown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-05-18 13:00:38, Chris Down wrote: > In the past, `enum log_flags` was part of `struct log`, hence the name. > `struct log` has since been reworked and now this struct is stored > inside `struct printk_info`. However, the name was never updated, which > is somewhat confusing -- especially since these flags operate at the > record level rather than at the level of an abstract log. > > printk_info_flags also joins its other metadata struct friends in > printk_ringbuffer.h. > > Signed-off-by: Chris Down > Cc: Petr Mladek Reviewed-by: Petr Mladek Just one nit below. > diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h > index 73cc80e01cef..71918d47ca95 100644 > --- a/kernel/printk/printk_ringbuffer.h > +++ b/kernel/printk/printk_ringbuffer.h > @@ -50,6 +50,12 @@ struct prb_data_blk_lpos { > unsigned long next; > }; > > +/* Flags for a single printk record. */ > +enum printk_info_flags { > + LOG_NEWLINE = 2, /* text ended with a newline */ > + LOG_CONT = 8, /* text is a fragment of a continuation line */ > +}; Nit: Could you please move this after "enum desc_state" declaration? > /* > * A descriptor: the complete meta-data for a record. > * > -- > 2.31.1 Best Regards, Petr