Messages in this thread |  | | Subject | Re: [PATCH v3] printk: Add boottime and real timestamps | From | Mark Salyzyn <> | Date | Fri, 4 Aug 2017 09:42:18 -0700 |
| |
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
|  |