qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
	qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] Purpose of qemu-common.h (was Re: [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients)
Date: Fri, 26 Apr 2013 00:33:02 +0300	[thread overview]
Message-ID: <20130425213302.GA5321@redhat.com> (raw)
In-Reply-To: <20130425205741.GI11821@otherpad.lan.raisama.net>

On Thu, Apr 25, 2013 at 05:57:41PM -0300, Eduardo Habkost wrote:
> On Thu, Apr 25, 2013 at 03:45:04PM -0500, Anthony Liguori wrote:
> > Eduardo Habkost <ehabkost@redhat.com> writes:
> > 
> > > On Thu, Apr 25, 2013 at 02:03:05PM -0500, Anthony Liguori wrote:
> > >> Laszlo Ersek <lersek@redhat.com> writes:
> > >> > --- /dev/null
> > >> > +++ b/hw/i386/acpi.h
> > >> > +
> > >> > +#include <stddef.h>
> > >> 
> > >> QEMU style would normally be to use qemu-common.h here but honestly I
> > >> prefer using system headers when it's possible.  Just FYI.
> > >
> > > I thought we were actively trying to stop including qemu-common.h from
> > > other header files, because it easily leads to unexpected (and hard to
> > > fix) circular header dependencies.
> > 
> > The problem is qemu-common including other headers, not other headers
> > including qemu-common...
> 
> Well, it depends on what's the stated purpose/rules of qemu-common.h. If
> its purpose if to allow .c files to have many commonly-used definitions
> available without including commonly-used header files one by one,
> qemu-common.h will inevitably include other QEMU header files.
> 
> > 
> > But like I said in my original note, I don't like using qemu-common in
> > headers anyway.
> 
> Agreed on this specific case. But I would really like to clarify the
> purpose of qemu-common.h, because I always believed that it was supposed
> to be a "includes lots of other stuff" header, not a "is included by
> lots of other stuff" header (and it can't be both).
> 
> 
> BTW, qemu-common.h already have a comment stating the following:
> 
> """
> This file is supposed to be included only by .c files. No header file should
> depend on qemu-common.h, as this would easily lead to circular header
> dependencies.
> """
> 
> If this is not true, we must correct it.

I think most of these should be switched to include
qemu/typedefs.h. qemu-common used to have all typedefs
a while ago.


> -- 
> Eduardo

  reply	other threads:[~2013-04-25 21:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 20:22 [Qemu-devel] [PATCH v4 0/7] publish etc/acpi/APIC in fw_cfg Laszlo Ersek
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 1/7] refer to FWCfgState explicitly Laszlo Ersek
2013-04-25 18:44   ` Anthony Liguori
2013-04-25 21:04     ` Michael S. Tsirkin
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 2/7] acpi_table_install(): fix funcparam formatting in leading comment Laszlo Ersek
2013-04-25 18:44   ` Anthony Liguori
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 3/7] hw/acpi: extract standard table headers as a standalone structure Laszlo Ersek
2013-04-25 18:47   ` Anthony Liguori
2013-04-26  9:32     ` Laszlo Ersek
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 4/7] hw/acpi: export default ACPI headers using the type just introduced Laszlo Ersek
2013-04-25 18:49   ` Anthony Liguori
2013-04-26  9:53     ` Laszlo Ersek
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 5/7] hw/acpi: export acpi_checksum() Laszlo Ersek
2013-04-25 18:55   ` Anthony Liguori
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 6/7] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h Laszlo Ersek
2013-04-25 18:55   ` Anthony Liguori
2013-04-18 20:22 ` [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients Laszlo Ersek
2013-04-18 20:30   ` Michael S. Tsirkin
2013-04-19 10:58     ` Laszlo Ersek
2013-04-24  9:42       ` Michael S. Tsirkin
2013-04-25 19:03   ` Anthony Liguori
2013-04-25 20:11     ` Eduardo Habkost
2013-04-25 20:45       ` Anthony Liguori
2013-04-25 20:57         ` [Qemu-devel] Purpose of qemu-common.h (was Re: [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients) Eduardo Habkost
2013-04-25 21:33           ` Michael S. Tsirkin [this message]
2013-04-26 11:13     ` [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients Laszlo Ersek
2013-04-29  8:20       ` Michael S. Tsirkin
2013-04-29 12:39         ` Kevin O'Connor
2013-04-29 13:21           ` Michael S. Tsirkin
2013-04-29 13:21           ` Laszlo Ersek
2013-04-24  9:39 ` [Qemu-devel] [PATCH v4 0/7] publish etc/acpi/APIC in fw_cfg Laszlo Ersek
2013-04-25 16:45   ` Anthony Liguori

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=20130425213302.GA5321@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.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).