[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFTL4hxcS-_LL8RLGaSKnb4K=MeNxzaL3GDC2JmjBDF_o4v2rg@mail.gmail.com>
Date: Wed, 23 Jan 2013 16:17:27 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: sedat.dilek@...il.com, "devendra.aaru" <devendra.aaru@...il.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m
2013/1/23 Steven Rostedt <rostedt@...dmis.org>:
> On Wed, 2013-01-23 at 15:02 +0100, Frederic Weisbecker wrote:
>
>> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
>> index bbb2c2c..a13b8a3 100644
>> --- a/kernel/context_tracking.c
>> +++ b/kernel/context_tracking.c
>> @@ -111,14 +111,19 @@ void guest_enter(void)
>> else
>> __guest_enter();
>> }
>> +EXPORT_SYMBOL_GPL(guest_enter);
>>
>> void guest_exit(void)
>> {
>> +#ifndef CONFIG_KVM
>> +i
>> +#endif
>
> I don't like #ifdefs in .c files. They belong in headers. Could you
> convert this to be:
>
> include/linux/context_tracking.h:
>
> #ifdef CONFIG_KVM
> #define add_vi_i_typo()
> #else
> #define add_vi_i_typo() i
> #endif
>
> and then in context_tracking.c:
>
> void guest_exit(void)
> {
> add_vi_typo();
>
> [...]
Much cleaner indeed! And this way it's more generally available for
further users.
Will do the change, thanks!
--
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