[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes
From: |
Thomas Huth |
Subject: |
Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes |
Date: |
Mon, 23 Nov 2020 09:16:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
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?
Thomas
- [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Thomas Huth, 2020/11/18
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Christian Borntraeger, 2020/11/18
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Philippe Mathieu-Daudé, 2020/11/18
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Markus Armbruster, 2020/11/18
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Peter Maydell, 2020/11/18
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes,
Thomas Huth <=
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Markus Armbruster, 2020/11/23
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Cornelia Huck, 2020/11/23
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Thomas Huth, 2020/11/23
- Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Cornelia Huck, 2020/11/24
Re: [PATCH] hw/watchdog/wdt_diag288: Remove unnecessary includes, Cornelia Huck, 2020/11/24