All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 0/3] clean-includes script to add osdep.h to everything
Date: Tue, 19 Jan 2016 08:27:42 +0100	[thread overview]
Message-ID: <87mvs2do5t.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA91J6QvNj_dido1szdEjZbGVr2aeo1V2hbwFxCf11EGrw@mail.gmail.com> (Peter Maydell's message of "Mon, 18 Jan 2016 16:33:19 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> On 11 January 2016 at 15:19, Daniel P. Berrange <berrange@redhat.com> wrote:
>> On Mon, Dec 07, 2015 at 04:23:42PM +0000, Peter Maydell wrote:
>>> We've had some discussion previously (on list and IRC) about adding an
>>> include of "qemu/osdep.h" to everything. The basic idea is that every
>>> .c file should include "qemu/osdep.h" as its first include; then every
>>> other header (and the .c file itself) can rely on the facilities that
>>> osdep.h provides.
>>>
>>> This patchset is mostly here to get comment and review on the script
>>> I've written to do the job of automatically updating the source files.
>
> In the absence of any other comments from anybody I guess we can
> go ahead and commit this series... (the osdep.h patch it depends
> on has been committed already).
>
>>> Patches 2 and 3 are examples of its output, produced via
>>>  scripts/clean-includes --git target-arm target-arm/*.c
>>>  scripts/clean-includes --git hw/arm hw/arm/*.c
>>>
>>> NB: the script assumes my patch to make osdep.h include
>>> glib-compat.h has already been applied:
>>>   http://patchwork.ozlabs.org/patch/552828/
>>>
>>> Once we're happy with the set of transformations it produces the
>>> next question is how we want to apply it to the tree. The good
>>> news is that the changes to the .c files are idempotent and don't
>>> depend on each other, so we could send things via different
>>> submaintainer trees. Or we could have a single patchseries which we
>>> apply all at once on the theory that this minimises the pain overall.
>>
>> I think either approach would work as long as we don't let it drag
>> out too long in sub-maintainer trees. ie aim to get every file
>> cleaned & merged before 2.6 rc.
>
> I guess I'll start off with some series for the obviously maintained
> areas of the tree and then we can mop up the rest later.
>
> (At some point a script which identifies files which haven't been
> cleaned up yet would be handy.)

Do what you think is best.  I'd go for a single patch fixing up the
complete tree.

>>> A question I had about including osdep.h everywhere:
>>> are there any files in the tree where we *can't* include it?
>>> (Obvious possible candidates would be standalone test programs
>>> and the guest-agent code.)
>>
>> I think even guest-agent code & tests could include it in order to
>> get clean includes, even if they don't use any of the QEMU functions
>> defined in it. So I think its simplest to just say every .c file must
>> use it and leave it at that.
>
> OK, let's assume that works.

If it doesn't, we need a header with just configuration results that is
included in every .c file first.  Just like config.h should be when
using autoconf.

  parent reply	other threads:[~2016-01-19  7:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 16:23 [Qemu-devel] [PATCH 0/3] clean-includes script to add osdep.h to everything Peter Maydell
2015-12-07 16:23 ` [Qemu-devel] [PATCH 1/3] scripts: Add new clean-includes script to fix C include directives Peter Maydell
2016-01-11 15:23   ` Daniel P. Berrange
2015-12-07 16:23 ` [Qemu-devel] [PATCH 2/3] target-arm: Clean up includes Peter Maydell
2016-01-11 15:26   ` Daniel P. Berrange
2015-12-07 16:23 ` [Qemu-devel] [PATCH 3/3] hw/arm: " Peter Maydell
2016-01-11 13:08 ` [Qemu-devel] [PATCH 0/3] clean-includes script to add osdep.h to everything Peter Maydell
2016-01-11 15:19 ` Daniel P. Berrange
2016-01-18 16:33   ` Peter Maydell
2016-01-18 17:08     ` Peter Maydell
2016-01-19  7:27     ` Markus Armbruster [this message]
2016-01-19  8:46       ` 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=87mvs2do5t.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.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.