From: Christopher Harvey <charvey@matrox.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Implement the global timer present in ARM MPCore chips.
Date: Thu, 7 Jul 2011 13:15:00 -0400 [thread overview]
Message-ID: <20110707171500.GF5438@harvey-pc.matrox.com> (raw)
In-Reply-To: <CAFEAcA_9HEfr3ZNx92HkEAc2p0zoxtAY5zGyim3JXya0g39wZw@mail.gmail.com>
On Wed, Jul 06, 2011 at 10:58:09PM +0100, Peter Maydell wrote:
> On 6 July 2011 21:04, Christopher Harvey <charvey@matrox.com> wrote:
>
> Below are some random comments noticed on a first-pass.
>
> > +/* Global timer data */
> > +static uint64_t global_timer_count = 0;
> > +static uint64_t global_timer_this_inc = 0;
> > + ??/* Only for prescale and enable bits */
> > +static uint32_t global_timer_control = 0;
>
> Static globals look like the wrong thing to me.
>
My C code design is pretty bad. I generally just try to copy the style
around what I'm editing. These variables are to be used exclusively
inside hw/mpcore.c and are referenced in many of the functions. How
would you change this code?
thanks,
-Chris
prev parent reply other threads:[~2011-07-07 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 20:04 [Qemu-devel] [PATCH] Implement the global timer present in ARM MPCore chips Christopher Harvey
2011-07-06 21:58 ` Peter Maydell
2011-07-07 17:15 ` Christopher Harvey [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=20110707171500.GF5438@harvey-pc.matrox.com \
--to=charvey@matrox.com \
--cc=peter.maydell@linaro.org \
--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 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.