From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbdHDQmZ (ORCPT ); Fri, 4 Aug 2017 12:42:25 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:32909 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbdHDQmV (ORCPT ); Fri, 4 Aug 2017 12:42:21 -0400 Subject: Re: [PATCH v3] printk: Add boottime and real timestamps To: Prarit Bhargava , linux-kernel@vger.kernel.org Cc: Jonathan Corbet , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Stultz , Thomas Gleixner , Stephen Boyd , Andrew Morton , Greg Kroah-Hartman , "Paul E. McKenney" , Christoffer Dall , Deepa Dinamani , Ingo Molnar , Joel Fernandes , Kees Cook , Peter Zijlstra , Geert Uytterhoeven , "Luis R. Rodriguez" , Nicholas Piggin , "Jason A. Donenfeld" , Olof Johansson , Josh Poimboeuf , linux-doc@vger.kernel.org References: <1501809524-496-1-git-send-email-prarit@redhat.com> From: Mark Salyzyn Message-ID: <53cceba0-e02c-6e5e-6272-9edc63d17ac4@android.com> Date: Fri, 4 Aug 2017 09:42:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1501809524-496-1-git-send-email-prarit@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2017 06:18 PM, Prarit Bhargava wrote: > + /* > + * Only allow enabling and disabling of the current printk_time > + * setting. Changing it from one setting to another confuses > + * userspace. > + */ We should allow a debug option to permit this (but that can be a followup patch, do not stall this one on a wish-list item). > + if (printk_time_setting == PRINTK_TIME_DISABLE) { > + printk_time_setting = _printk_time; > + } else if ((printk_time_setting != _printk_time) && > + (_printk_time != 0)) { > + pr_warn("printk: timestamp can only be set to 0(disabled) or %d(%s) ", trailing space? why did checkpatch.pl not find this for you? should be trailing newline. > + printk_time_setting, > + printk_time_str[printk_time_setting]); > + return -EINVAL; > + } > + > + printk_time = _printk_time; > + pr_info("printk: timestamp set to %d(%s).", missing trailing newline > + printk_time, printk_time_str[printk_time]); > + return 0; > +} -- Mark