Re: Cleanup console loglevels

From: Borislav Petkov
Date: Fri May 16 2014 - 13:52:15 EST


On Fri, May 16, 2014 at 07:49:21PM +0200, Borislav Petkov wrote:
> Hi,
>
> so I was staring at
>
> 12544697f12e ("x86_64: be less annoying on boot, v2")
>
> and how naked numbers mean sh*t and how I have to grep sources to find
> out what this 10 thing means. So how about the following cleanup? We can
> do it this way, we can do accessors and stuff, whatever. But the naked
> numbers are plain misleading.
>
> So how about it? I'm asking whether it makes sense first before I go
> and replace all tests of console_loglevel with naked numbers around the
> tree.
>
> Thanks.
>
> ---
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index 068054f4bf20..0029d974e431 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -172,7 +172,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
> */
> load_ucode_bsp();
>
> - if (console_loglevel == 10)
> + if (console_loglevel >= CONSOLE_LOGLEVEL_QUIET)

That's CONSOLE_LOGLEVEL_DEBUG, of course.

See, misleading. :-P

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/