lkml.org 
[lkml]   [2019]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/5] random: Add and use pr_fmt()
From
Date
On Fri, 2019-06-07 at 14:25 -0400, Yangtao Li wrote:
> Prefix all printk/pr_<level> messages with "random: " to make the
> logging a bit more consistent.
>
> Miscellanea:
>
> o Convert a printks to pr_notice
> o Whitespace to align to open parentheses
> o Remove embedded "random: " from pr_* as pr_fmt adds it
[]
> diff --git a/drivers/char/random.c b/drivers/char/random.c
[]
> @@ -1031,15 +1033,15 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
> crng_init = 2;
> process_random_ready_list();
> wake_up_interruptible(&crng_init_wait);
> - pr_notice("random: crng init done\n");
> + pr_notice("crng init done\n");
> if (unseeded_warning.missed) {
> - pr_notice("random: %d get_random_xx warning(s) missed "
> + pr_notice("%d get_random_xx warning(s) missed "
> "due to ratelimiting\n",

Trivia:

It'd be nice to coalesce the format string fragments
into a single line at the same time too.

pr_notice("%d get_random_xx warning(s) missed due to ratelimiting\n",
unseeded_warning.missed);

> unseeded_warning.missed = 0;
> }
> if (urandom_warning.missed) {
> - pr_notice("random: %d urandom warning(s) missed "
> + pr_notice("%d urandom warning(s) missed "
> "due to ratelimiting\n",

etc...



\
 
 \ /
  Last update: 2019-06-10 21:13    [W:0.102 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site