[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120302110440.GA24019@elte.hu>
Date:	Fri, 2 Mar 2012 12:04:40 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	andreas.herrmann3@....com, sp@...ascale.com, bp@...64.org,
	tglx@...utronix.de, borislav.petkov@....com,
	daniel@...ascale-asia.com
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86/platform: Remove incorrect error message in
 x86_default_fixup_cpu_id()
* tip-bot for Andreas Herrmann <andreas.herrmann3@....com> wrote:
> +++ b/arch/x86/kernel/cpu/common.c
> diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
> index 947a06c..67cf78a 100644
> --- a/arch/x86/kernel/x86_init.c
> +++ b/arch/x86/kernel/x86_init.c
> @@ -90,6 +90,7 @@ struct x86_init_ops x86_init __initdata = {
>  	},
>  };
>  
> +void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int n) { }
>  struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
Hm, I missed this first time around:
 - why is this function global? It's not used by anything else.
 - why is it squeezed before a structure without any vertical 
   separation?
 - why does it have the body as { }, as if it were an inline 
   function?
Really, this should either be a short static function, with a 
proper body, or we should accept a NULL pointer there and check 
for it before calling it - there's a single usage site right 
now.
The latter looks like the cleanest solution to me.
Thanks,
	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
