Re: [PATCH 1/2] lib, switch CONFIG_PRINTK_TIME to int
From: Petr Mladek
Date: Mon Apr 25 2016 - 11:59:45 EST
On Fri 2016-04-22 08:03:08, Prarit Bhargava wrote:
> CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for
> the monotonic and real time clock it must be expanded to an int.
>
> diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
> index 4f404a6..0250dbd 100644
> --- a/arch/x86/configs/x86_64_defconfig
> +++ b/arch/x86/configs/x86_64_defconfig
> @@ -284,7 +284,7 @@ CONFIG_NLS_CODEPAGE_437=y
> CONFIG_NLS_ASCII=y
> CONFIG_NLS_ISO8859_1=y
> CONFIG_NLS_UTF8=y
> -CONFIG_PRINTK_TIME=y
> +CONFIG_PRINTK_TIME=1
> # CONFIG_ENABLE_WARN_DEPRECATED is not set
> CONFIG_MAGIC_SYSRQ=y
> # CONFIG_UNUSED_SYMBOLS is not set
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 1e9a607..774aa38 100644
[...]
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1,7 +1,9 @@
> menu "printk and dmesg options"
>
> config PRINTK_TIME
> - bool "Show timing information on printks"
> + int "Show timing information on printks (0-1)"
> + range 0 1
> + default "0"
I get "0" as the default when running "make" with this patch:
$>> make oldconfig
scripts/kconfig/conf --oldconfig Kconfig
.config:3463:warning: symbol value 'y' invalid for PRINTK_TIME
*
* Restart config...
*
*
* printk and dmesg options
*
Show timing information on printks (0-3) (PRINTK_TIME) [0] (NEW)
^^^
And it really writes 0 into .config:
$>> grep PRINTK_TIME .config
CONFIG_PRINTK_TIME=0
It seems that arch/x86/configs/x86_64_defconfig is used only when
you call "make defconfig"
Hmm, this might be surprising and annoying for many people. I would
suggest to make "1" as the default value and remove the default from
all that defconfigs. It is default on almost all systems and it is
why people would expect.
Best Regards,
Petr