qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 07/24] pc: Rename pc_machine variables to pcms
Date: Thu, 13 Aug 2015 15:14:58 +0300	[thread overview]
Message-ID: <1439468033-6413-8-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1439468033-6413-1-git-send-email-mst@redhat.com>

From: Eduardo Habkost <ehabkost@redhat.com>

Make the code use the same variable name everywhere. "pcms" is already
being used in existing code and it's shorter.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/i386/pc.c      |  4 ++--
 hw/i386/pc_piix.c | 20 ++++++++++----------
 hw/i386/pc_q35.c  | 20 ++++++++++----------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7c811cd..ad1a861 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -435,7 +435,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
 {
     int val;
     static pc_cmos_init_late_arg arg;
-    PCMachineState *pc_machine = PC_MACHINE(machine);
+    PCMachineState *pcms = PC_MACHINE(machine);
     Error *local_err = NULL;
 
     /* various important CMOS locations needed by PC/Bochs bios */
@@ -478,7 +478,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
 
     object_property_add_link(OBJECT(machine), "rtc_state",
                              TYPE_ISA_DEVICE,
-                             (Object **)&pc_machine->rtc,
+                             (Object **)&pcms->rtc,
                              object_property_allow_set_link,
                              OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
     object_property_set_link(OBJECT(machine), OBJECT(s),
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 482555f..c88ed0d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -78,7 +78,7 @@ static bool kvmclock_enabled = true;
 /* PC hardware initialisation */
 static void pc_init1(MachineState *machine)
 {
-    PCMachineState *pc_machine = PC_MACHINE(machine);
+    PCMachineState *pcms = PC_MACHINE(machine);
     MemoryRegion *system_memory = get_system_memory();
     MemoryRegion *system_io = get_system_io();
     int i;
@@ -117,13 +117,13 @@ static void pc_init1(MachineState *machine)
     /* Handle the machine opt max-ram-below-4g.  It is basically doing
      * min(qemu limit, user limit).
      */
-    if (lowmem > pc_machine->max_ram_below_4g) {
-        lowmem = pc_machine->max_ram_below_4g;
+    if (lowmem > pcms->max_ram_below_4g) {
+        lowmem = pcms->max_ram_below_4g;
         if (machine->ram_size - lowmem > lowmem &&
             lowmem & ((1ULL << 30) - 1)) {
             error_report("Warning: Large machine and max_ram_below_4g(%"PRIu64
                          ") not a multiple of 1G; possible bad performance.",
-                         pc_machine->max_ram_below_4g);
+                         pcms->max_ram_below_4g);
         }
     }
 
@@ -234,14 +234,14 @@ static void pc_init1(MachineState *machine)
 
     pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
 
-    assert(pc_machine->vmport != ON_OFF_AUTO_MAX);
-    if (pc_machine->vmport == ON_OFF_AUTO_AUTO) {
-        pc_machine->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
+    assert(pcms->vmport != ON_OFF_AUTO_MAX);
+    if (pcms->vmport == ON_OFF_AUTO_AUTO) {
+        pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
     }
 
     /* init basic PC hardware */
     pc_basic_device_init(isa_bus, gsi, &rtc_state, true,
-                         (pc_machine->vmport != ON_OFF_AUTO_ON), 0x4);
+                         (pcms->vmport != ON_OFF_AUTO_ON), 0x4);
 
     pc_nic_init(isa_bus, pci_bus);
 
@@ -286,13 +286,13 @@ static void pc_init1(MachineState *machine)
         /* TODO: Populate SPD eeprom data.  */
         smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
                               gsi[9], smi_irq,
-                              pc_machine_is_smm_enabled(pc_machine),
+                              pc_machine_is_smm_enabled(pcms),
                               &piix4_pm);
         smbus_eeprom_init(smbus, 8, NULL, 0);
 
         object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP,
                                  TYPE_HOTPLUG_HANDLER,
-                                 (Object **)&pc_machine->acpi_dev,
+                                 (Object **)&pcms->acpi_dev,
                                  object_property_allow_set_link,
                                  OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
         object_property_set_link(OBJECT(machine), OBJECT(piix4_pm),
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 1da9b3a..d0e4350 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -65,7 +65,7 @@ static bool has_reserved_memory = true;
 /* PC hardware initialisation */
 static void pc_q35_init(MachineState *machine)
 {
-    PCMachineState *pc_machine = PC_MACHINE(machine);
+    PCMachineState *pcms = PC_MACHINE(machine);
     ram_addr_t below_4g_mem_size, above_4g_mem_size;
     Q35PCIHost *q35_host;
     PCIHostState *phb;
@@ -108,13 +108,13 @@ static void pc_q35_init(MachineState *machine)
     /* Handle the machine opt max-ram-below-4g.  It is basically doing
      * min(qemu limit, user limit).
      */
-    if (lowmem > pc_machine->max_ram_below_4g) {
-        lowmem = pc_machine->max_ram_below_4g;
+    if (lowmem > pcms->max_ram_below_4g) {
+        lowmem = pcms->max_ram_below_4g;
         if (machine->ram_size - lowmem > lowmem &&
             lowmem & ((1ULL << 30) - 1)) {
             error_report("Warning: Large machine and max_ram_below_4g(%"PRIu64
                          ") not a multiple of 1G; possible bad performance.",
-                         pc_machine->max_ram_below_4g);
+                         pcms->max_ram_below_4g);
         }
     }
 
@@ -207,7 +207,7 @@ static void pc_q35_init(MachineState *machine)
 
     object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP,
                              TYPE_HOTPLUG_HANDLER,
-                             (Object **)&pc_machine->acpi_dev,
+                             (Object **)&pcms->acpi_dev,
                              object_property_allow_set_link,
                              OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort);
     object_property_set_link(OBJECT(machine), OBJECT(lpc),
@@ -242,17 +242,17 @@ static void pc_q35_init(MachineState *machine)
 
     pc_register_ferr_irq(gsi[13]);
 
-    assert(pc_machine->vmport != ON_OFF_AUTO_MAX);
-    if (pc_machine->vmport == ON_OFF_AUTO_AUTO) {
-        pc_machine->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
+    assert(pcms->vmport != ON_OFF_AUTO_MAX);
+    if (pcms->vmport == ON_OFF_AUTO_AUTO) {
+        pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
     }
 
     /* init basic PC hardware */
     pc_basic_device_init(isa_bus, gsi, &rtc_state, !mc->no_floppy,
-                         (pc_machine->vmport != ON_OFF_AUTO_ON), 0xff0104);
+                         (pcms->vmport != ON_OFF_AUTO_ON), 0xff0104);
 
     /* connect pm stuff to lpc */
-    ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pc_machine), !mc->no_tco);
+    ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pcms), !mc->no_tco);
 
     /* ahci and SATA device, for q35 1 ahci controller is built-in */
     ahci = pci_create_simple_multifunction(host_bus,
-- 
MST

  parent reply	other threads:[~2015-08-13 12:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 12:14 [Qemu-devel] [PULL 00/24] virtio,pc,acpi fixes, cleanups Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 01/24] make: fix where dependency *.d are stored Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 02/24] make: load only required dependency files Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 03/24] piix: Document coreboot-specific RAM size config register Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 04/24] pc: Use PC_COMPAT_* for CPUID feature compatibility Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 05/24] target-i386: Remove x86_cpu_compat_set_features() Michael S. Tsirkin
2015-08-13 12:14 ` [Qemu-devel] [PULL 06/24] pc: Use error_abort when registering properties Michael S. Tsirkin
2015-08-13 12:14 ` Michael S. Tsirkin [this message]
2015-08-13 12:15 ` [Qemu-devel] [PULL 08/24] pc: Move PCMachineClass, PCMachineState to qemu/typedefs.h Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 09/24] pc: Eliminate pc_common_machine_options() Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 10/24] pc: Eliminate pc_default_machine_options() Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 11/24] pc: Use PCMachineState for pc_cmos_init() argument Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 12/24] pc: Use PCMachineState for pc_memory_init() argument Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 13/24] pc: Move {above, below}_4g_mem_size variables to PCMachineState Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 14/24] pc: Use PCMachineState as pc_guest_info_init() argument Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 15/24] pc: Remove redundant arguments from *load_linux() Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 16/24] pc: Remove redundant arguments from pc_cmos_init() Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 17/24] pc: Remove redundant arguments from pc_memory_init() Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 18/24] pci: allow 0 address for PCI IO/MEM regions Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 19/24] virtio-net: remove useless codes Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 20/24] acpi: avoid potential uninitialized access to cpu_hp_io_base Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 21/24] smbios: extract x86 smbios building code into a function Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 22/24] smbios: remove dependency on x86 e820 tables Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 23/24] smbios: move smbios code into a common folder Michael S. Tsirkin
2015-08-13 12:15 ` [Qemu-devel] [PULL 24/24] MAINTAINERS: list smbios maintainers Michael S. Tsirkin
2015-08-13 16:41 ` [Qemu-devel] [PULL 00/24] virtio,pc,acpi fixes, cleanups Peter Maydell

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=1439468033-6413-8-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).