Re: [PATCH 2/2] mm: workingset: printk missing log level, use pr_info()

From: Joe Perches
Date: Mon Jun 27 2016 - 00:01:41 EST


On Mon, 2016-06-27 at 09:01 +1000, Anton Blanchard wrote:
> commit 612e44939c3c ("mm: workingset: eviction buckets for bigmem/lowbit
> machines") added a printk without a log level. Quieten it by using
> pr_info().
[]
> diff --git a/mm/workingset.c b/mm/workingset.c
[]
> @@ -491,7 +491,7 @@ static int __init workingset_init(void)
>   max_order = fls_long(totalram_pages - 1);
>   if (max_order > timestamp_bits)
>   bucket_order = max_order - timestamp_bits;
> - printk("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n",
> + pr_info("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n",
>          timestamp_bits, max_order, bucket_order);

Because it's possible to have more printks added,
perhaps it's better to add

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

before any #include and remove the "workingset: "
prefix here.