From: Paolo Bonzini <pbonzini@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>, qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH 1/2] pc_init1: Don't misuse int for holding up a bool
Date: Wed, 20 May 2015 11:55:53 +0200 [thread overview]
Message-ID: <555C5A29.8090106@redhat.com> (raw)
In-Reply-To: <e45d835a6916642c34a56815f253fa5198aace4b.1432112914.git.mprivozn@redhat.com>
On 20/05/2015 11:15, Michal Privoznik wrote:
> When going through code I realized, that the pc_init1() has this two
> arguments @pci_enabled and @kvmclock_enabled which despite used as
> booleans are of int type.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Eduardo, do your patches to the PC machine types subsume this change?
Paolo
> ---
> hw/i386/pc_piix.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 212e263..97650b0 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -74,8 +74,8 @@ static bool has_reserved_memory = true;
>
> /* PC hardware initialisation */
> static void pc_init1(MachineState *machine,
> - int pci_enabled,
> - int kvmclock_enabled)
> + bool pci_enabled,
> + bool kvmclock_enabled)
> {
> PCMachineState *pc_machine = PC_MACHINE(machine);
> MemoryRegion *system_memory = get_system_memory();
> @@ -307,7 +307,7 @@ static void pc_init1(MachineState *machine,
>
> static void pc_init_pci(MachineState *machine)
> {
> - pc_init1(machine, 1, 1);
> + pc_init1(machine, true, true);
> }
>
> static void pc_compat_2_3(MachineState *machine)
> @@ -483,7 +483,7 @@ static void pc_init_pci_1_2(MachineState *machine)
> static void pc_init_pci_no_kvmclock(MachineState *machine)
> {
> pc_compat_1_2(machine);
> - pc_init1(machine, 1, 0);
> + pc_init1(machine, true, false);
> }
>
> static void pc_init_isa(MachineState *machine)
> @@ -500,7 +500,7 @@ static void pc_init_isa(MachineState *machine)
> }
> x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
> enable_compat_apic_id_mode();
> - pc_init1(machine, 0, 1);
> + pc_init1(machine, false, true);
> }
>
> #ifdef CONFIG_XEN
>
next prev parent reply other threads:[~2015-05-20 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 9:15 [Qemu-devel] [PATCH 0/2] Couple of SMBIOS fixes Michal Privoznik
2015-05-20 9:15 ` [Qemu-devel] [PATCH 1/2] pc_init1: Don't misuse int for holding up a bool Michal Privoznik
2015-05-20 9:55 ` Paolo Bonzini [this message]
2015-05-20 12:30 ` Eduardo Habkost
2015-05-20 9:15 ` [Qemu-devel] [PATCH 2/2] SMBIOS: Allow users to chose base board type Michal Privoznik
2015-05-20 9:24 ` Paolo Bonzini
2015-05-20 12:09 ` Michal Privoznik
2015-05-20 14:16 ` Eric Blake
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=555C5A29.8090106@redhat.com \
--to=pbonzini@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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.