All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-s390x <qemu-s390x@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes
Date: Mon, 23 Nov 2020 11:47:25 +0100	[thread overview]
Message-ID: <874klgtkn6.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <8a91ad94-9a18-1f8b-b73d-92872495fdc3@redhat.com> (Thomas Huth's message of "Mon, 23 Nov 2020 09:16:46 +0100")

Thomas Huth <thuth@redhat.com> writes:

> On 18/11/2020 15.30, Peter Maydell wrote:
>> On Wed, 18 Nov 2020 at 14:24, Markus Armbruster <armbru@redhat.com> wrote:
>>>
>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>
>>>> On 11/18/20 10:03 AM, Thomas Huth wrote:
>>>>> Both headers, sysbus.h and module.h, are not required to compile this file.
>>>
>>> module.h is: it defines type_init().
>> 
>>>>>  #include "qemu/timer.h"
>>>>>  #include "hw/watchdog/wdt_diag288.h"
>>>>>  #include "migration/vmstate.h"
>>>>>  #include "qemu/log.h"
>>>>> -#include "qemu/module.h"
>>>>
>>>> Cc'ing Markus because of:
>> 
>>>>     Include qemu/module.h where needed, drop it from qemu-common.h
>>>
>>> If it still compiles and links, it must get it via some other header.
>> 
>> Yes: wdt_diag288.c -> include/hw/watchdog/wdt_diag288.h ->
>>  include/qom/object.h -> include/qemu/module.h
>
> So what's now our expectation here? Should every file that uses type_init()
> also include module.h ? That's IMHO not very intuitive...
> Or are we fine that type_init() is provided by qom/object.h which needs to
> be pulled in by every device sooner or later anyway?

I think it's okay to rely on indirect inclusion.



  reply	other threads:[~2020-11-23 10:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  9:03 [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes Thomas Huth
2020-11-18  9:06 ` Christian Borntraeger
2020-11-18 11:06 ` Philippe Mathieu-Daudé
2020-11-18 14:22   ` Markus Armbruster
2020-11-18 14:30     ` Peter Maydell
2020-11-23  8:16       ` Thomas Huth
2020-11-23 10:47         ` Markus Armbruster [this message]
2020-11-23 15:59           ` Cornelia Huck
2020-11-23 18:41             ` Thomas Huth
2020-11-24 11:02               ` Cornelia Huck
2020-11-24 11:03 ` Cornelia Huck

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=874klgtkn6.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.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 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.