Re: linux-next: build warning after merge of the printk tree

From: Petr Mladek
Date: Tue Jul 10 2018 - 05:19:16 EST


On Tue 2018-07-10 12:46:14, Maninder Singh wrote:
> Hi Petr,
>
> > Hi all,
>
> > After merging the printk tree, today's linux-next build (x86_64
> > allnoconfig) produced this warning:
>
> > kernel/printk/printk.c:2033:13: warning: 'suppress_message_printing' defined but not used [-Wunused-function]
> > static bool suppress_message_printing(int level) { return false; }
> ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> seems there is no user for suppress_message_printing when CONFIG_PRINTK is disabled,
> because earlier it was getting used in console_unlock and now we shifted this into vprintk_emit
> which will be disabled on disabling CONFIG_PRINTk.
>
> should we remove this defination when CONFIG_PRINTK is disabled ?
>
> > Introduced by commit
> > 375899cddcbb ("printk: make sure to print log on console.")

Grr, I wonder how I missed it. I usually try build with CONFIG_PRINTK
disabled.

Anyway, I have just pushed the following patch into printk.git,
branch for-4.19: