qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Zaborowski <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5709] Don't use "hz" in identifiers to make AIX happy.
Date: Wed, 12 Nov 2008 17:36:09 +0000	[thread overview]
Message-ID: <E1L0JdR-0007kn-7P@cvs.savannah.gnu.org> (raw)

Revision: 5709
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5709
Author:   balrog
Date:     2008-11-12 17:36:08 +0000 (Wed, 12 Nov 2008)

Log Message:
-----------
Don't use "hz" in identifiers to make AIX happy.

malc found AIX headers leak "hz" and so it can't be used there.  Change
the occurences in hw/.

Modified Paths:
--------------
    trunk/hw/i2c.h
    trunk/hw/rc4030.c
    trunk/hw/twl92230.c
    trunk/hw/vga.c
    trunk/hw/wm8750.c

Modified: trunk/hw/i2c.h
===================================================================
--- trunk/hw/i2c.h	2008-11-12 17:18:41 UTC (rev 5708)
+++ trunk/hw/i2c.h	2008-11-12 17:36:08 UTC (rev 5709)
@@ -68,7 +68,7 @@
 uint32_t wm8750_adc_dat(void *opaque);
 void *wm8750_dac_buffer(void *opaque, int samples);
 void wm8750_dac_commit(void *opaque);
-void wm8750_set_bclk_in(void *opaque, int hz);
+void wm8750_set_bclk_in(void *opaque, int new_hz);
 
 /* ssd0303.c */
 void ssd0303_init(DisplayState *ds, i2c_bus *bus, int address);

Modified: trunk/hw/rc4030.c
===================================================================
--- trunk/hw/rc4030.c	2008-11-12 17:18:41 UTC (rev 5708)
+++ trunk/hw/rc4030.c	2008-11-12 17:36:08 UTC (rev 5709)
@@ -70,11 +70,11 @@
 static void set_next_tick(rc4030State *s)
 {
     qemu_irq_lower(s->timer_irq);
-    uint32_t hz;
+    uint32_t tm_hz;
 
-    hz = 1000 / (s->itr + 1);
+    tm_hz = 1000 / (s->itr + 1);
 
-    qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / hz);
+    qemu_mod_timer(s->periodic_timer, qemu_get_clock(vm_clock) + ticks_per_sec / tm_hz);
 }
 
 /* called for accesses to rc4030 */

Modified: trunk/hw/twl92230.c
===================================================================
--- trunk/hw/twl92230.c	2008-11-12 17:18:41 UTC (rev 5708)
+++ trunk/hw/twl92230.c	2008-11-12 17:36:08 UTC (rev 5709)
@@ -54,7 +54,7 @@
     struct {
         uint8_t ctrl;
         uint16_t comp;
-        QEMUTimer *hz;
+        QEMUTimer *hz_tm;
         int64_t next;
         struct tm tm;
         struct tm new;
@@ -77,12 +77,12 @@
 static inline void menelaus_rtc_start(struct menelaus_s *s)
 {
     s->rtc.next =+ qemu_get_clock(rt_clock);
-    qemu_mod_timer(s->rtc.hz, s->rtc.next);
+    qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
 }
 
 static inline void menelaus_rtc_stop(struct menelaus_s *s)
 {
-    qemu_del_timer(s->rtc.hz);
+    qemu_del_timer(s->rtc.hz_tm);
     s->rtc.next =- qemu_get_clock(rt_clock);
     if (s->rtc.next < 1)
         s->rtc.next = 1;
@@ -106,7 +106,7 @@
     s->rtc.next_comp --;
     s->rtc.alm_sec --;
     s->rtc.next += 1000;
-    qemu_mod_timer(s->rtc.hz, s->rtc.next);
+    qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
     if ((s->rtc.ctrl >> 3) & 3) {				/* EVERY */
         menelaus_rtc_update(s);
         if (((s->rtc.ctrl >> 3) & 3) == 1 && !s->rtc.tm.tm_sec)
@@ -886,7 +886,7 @@
     s->i2c.send = menelaus_tx;
 
     s->irq = irq;
-    s->rtc.hz = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
+    s->rtc.hz_tm = qemu_new_timer(rt_clock, menelaus_rtc_hz, s);
     s->in = qemu_allocate_irqs(menelaus_gpio_set, s, 3);
     s->pwrbtn = qemu_allocate_irqs(menelaus_pwrbtn_set, s, 1)[0];
 

Modified: trunk/hw/vga.c
===================================================================
--- trunk/hw/vga.c	2008-11-12 17:18:41 UTC (rev 5708)
+++ trunk/hw/vga.c	2008-11-12 17:36:08 UTC (rev 5709)
@@ -169,7 +169,7 @@
     int div2, sldiv2, dots;
     int clocking_mode;
     int clock_sel;
-    const int hz[] = {25175000, 28322000, 25175000, 25175000};
+    const int clk_hz[] = {25175000, 28322000, 25175000, 25175000};
     int64_t chars_per_sec;
     struct vga_precise_retrace *r = &s->retrace_info.precise;
 
@@ -194,7 +194,7 @@
     clock_sel = (s->msr >> 2) & 3;
     dots = (s->msr & 1) ? 8 : 9;
 
-    chars_per_sec = hz[clock_sel] / dots;
+    chars_per_sec = clk_hz[clock_sel] / dots;
 
     htotal_chars <<= clocking_mode;
 
@@ -239,7 +239,7 @@
         div2, sldiv2,
         clocking_mode,
         clock_sel,
-        hz[clock_sel],
+        clk_hz[clock_sel],
         dots,
         r->ticks_per_char
         );

Modified: trunk/hw/wm8750.c
===================================================================
--- trunk/hw/wm8750.c	2008-11-12 17:18:41 UTC (rev 5708)
+++ trunk/hw/wm8750.c	2008-11-12 17:36:08 UTC (rev 5709)
@@ -723,11 +723,11 @@
     return *data;
 }
 
-void wm8750_set_bclk_in(void *opaque, int hz)
+void wm8750_set_bclk_in(void *opaque, int new_hz)
 {
     struct wm8750_s *s = (struct wm8750_s *) opaque;
 
-    s->ext_adc_hz = hz;
-    s->ext_dac_hz = hz;
+    s->ext_adc_hz = new_hz;
+    s->ext_dac_hz = new_hz;
     wm8750_clk_update(s, 1);
 }

                 reply	other threads:[~2008-11-12 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1L0JdR-0007kn-7P@cvs.savannah.gnu.org \
    --to=balrogg@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).