From: Isaku Yamahata <yamahata@valinux.co.jp>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: skandasa@cisco.com, adnan@khaleel.us, etmartin@cisco.com,
qemu-devel@nongnu.org, wexu2@cisco.com
Subject: [Qemu-devel] Re: [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability
Date: Fri, 22 Oct 2010 08:53:15 +0900 [thread overview]
Message-ID: <20101021235315.GG31309@valinux.co.jp> (raw)
In-Reply-To: <20101021080701.GB27985@redhat.com>
On Thu, Oct 21, 2010 at 10:07:01AM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 21, 2010 at 02:15:24PM +0900, Isaku Yamahata wrote:
> > Thank you for detailed review.
> >
> > On Wed, Oct 20, 2010 at 11:56:16AM +0200, Michael S. Tsirkin wrote:
> > > > +static uint32_t aer_log_del(PCIEAERLog *aer_log)
> > > > +{
> > > > + uint32_t i = aer_log->consumer;
> > > > + aer_log->consumer = aer_log_next(aer_log->consumer, aer_log->log_max);
> > > > + return i;
> > > > +}
> > >
> > >
> > > Please just use 'int' or 'unsigned' instead of uint32_t if you simply
> > > want to say 'a number'. Using specific length makes it impossible to
> > > say where you *really* want a value.
> >
> > PCIEAERLog is saved/loaded. So explicit sized number is chosen.
>
> I didn't notice. But consumer/producer are not guest visible, are they?
> If yes I think it's a mistake to save/load them, tying us to
> a specific implementation: just calculate and save the # of
> valid entries in the log.
ACIEAERLog and PCIEAERErr themselves are the implementation specific
internal states which is not visible to guest.
So there is no point of arguing that consumer/producer are
specific to implementation.
> Also I put the comment here but it is a general one: pls go over the
> code, and just take a look at what types you use all over and think
> whether size really matters. In most places it does not, it just must be
> big enough, so use int or unsigned there. It will be much harder for
> others to do so later.
Will do.
--
yamahata
next prev parent reply other threads:[~2010-10-21 23:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 8:18 [Qemu-devel] [PATCH v6 00/12] pcie port switch emulators Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 01/12] pcie: comment on hpev_intx Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 02/12] pci/bridge: fix pci_bridge_reset() Isaku Yamahata
2010-10-20 8:49 ` [Qemu-devel] " Michael S. Tsirkin
2010-10-20 9:04 ` Isaku Yamahata
2010-10-20 10:00 ` Michael S. Tsirkin
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 03/12] pcie port: define struct PCIEPort/PCIESlot and helper functions Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 04/12] ioh3420: pcie root port in X58 ioh Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 05/12] x3130: pcie upstream port Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 06/12] x3130: pcie downstream port Isaku Yamahata
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command Isaku Yamahata
2010-10-20 10:00 ` [Qemu-devel] " Michael S. Tsirkin
2010-10-21 3:46 ` Isaku Yamahata
2010-10-21 8:02 ` Michael S. Tsirkin
2010-10-21 9:41 ` Isaku Yamahata
2010-10-22 11:35 ` Markus Armbruster
2010-10-22 14:38 ` Michael S. Tsirkin
2010-10-22 14:52 ` Anthony Liguori
2010-10-25 4:16 ` Michael S. Tsirkin
2010-10-25 3:29 ` Isaku Yamahata
2010-10-25 4:15 ` Michael S. Tsirkin
2010-10-25 5:53 ` Isaku Yamahata
2010-10-25 5:55 ` Michael S. Tsirkin
2010-10-25 7:02 ` Isaku Yamahata
2010-10-25 7:27 ` Michael S. Tsirkin
2010-10-27 1:47 ` Isaku Yamahata
2010-10-27 13:31 ` Michael S. Tsirkin
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability Isaku Yamahata
2010-10-20 9:56 ` [Qemu-devel] " Michael S. Tsirkin
2010-10-21 5:15 ` Isaku Yamahata
2010-10-21 8:07 ` Michael S. Tsirkin
2010-10-21 23:53 ` Isaku Yamahata [this message]
2010-10-22 9:27 ` Michael S. Tsirkin
2010-10-22 11:28 ` Markus Armbruster
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 09/12] pcie/aer: glue aer error injection into qemu monitor Isaku Yamahata
2010-10-20 9:44 ` [Qemu-devel] " Michael S. Tsirkin
2010-10-20 8:18 ` [Qemu-devel] [PATCH v6 10/12] ioh3420: support aer Isaku Yamahata
2010-10-20 8:19 ` [Qemu-devel] [PATCH v6 11/12] x3130/upstream: " Isaku Yamahata
2010-10-20 8:19 ` [Qemu-devel] [PATCH v6 12/12] x3130/downstream: " Isaku Yamahata
2010-10-20 10:09 ` [Qemu-devel] Re: [PATCH v6 00/12] pcie port switch emulators Michael S. Tsirkin
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=20101021235315.GG31309@valinux.co.jp \
--to=yamahata@valinux.co.jp \
--cc=adnan@khaleel.us \
--cc=etmartin@cisco.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=skandasa@cisco.com \
--cc=wexu2@cisco.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 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).