From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Dustin Kirkland <kirkland@canonical.com>
Subject: Re: [PATCH] Fix non-KVM build
Date: Thu, 16 Jul 2009 10:54:05 +0200 [thread overview]
Message-ID: <4A5EEAAD.5040101@siemens.com> (raw)
In-Reply-To: <20090715175312.GH9642@redhat.com>
Michael S. Tsirkin wrote:
> On Wed, Jun 24, 2009 at 01:13:46PM -0500, Anthony Liguori wrote:
>> This introduces some #ifdefs in pcspk to fix the build when KVM isn't enabled.
>>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>> hw/pcspk.c | 15 +++++++++------
>> 1 files changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/hw/pcspk.c b/hw/pcspk.c
>> index 9e1b59a..236995a 100644
>> --- a/hw/pcspk.c
>> +++ b/hw/pcspk.c
>> @@ -80,11 +80,6 @@ static void kvm_set_pit_ch2(PITState *pit,
>> kvm_set_pit(kvm_context, inkernel_state);
>> }
>> }
>> -#else
>> -static inline void kvm_get_pit_ch2(PITState *pit,
>> - kvm_pit_state *inkernel_state) { }
>> -static inline void kvm_set_pit_ch2(PITState *pit,
>> - kvm_pit_state *inkernel_state) { }
>> #endif
>>
>
> The version with stubs looks cleaner to me. IMO we really should be
> moving away from ifdefs for features, and only use them for
> compiler-specific things. If for no other reason, then because it
> increases the common code that is compiled for all platforms,
> decreasing the chance that people submit a patch that does not
> build on soe platform.
>
> Is the issue with struct kvm_pit_state?
> Can't we just stub it out as well?
>
> struct kvm_pit_state {};
It's solved like that in current git. Do you still face problems?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2009-07-16 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 18:13 [PATCH] Fix non-KVM build Anthony Liguori
2009-06-24 19:17 ` Dustin Kirkland
2009-07-15 17:53 ` Michael S. Tsirkin
2009-07-16 8:54 ` Jan Kiszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A5EEAAD.5040101@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=kirkland@canonical.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.