qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH 03/11] hw/misc: add missing inclu


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 03/11] hw/misc: add missing includes
Date: Tue, 9 May 2017 14:20:23 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi Eric,

On 05/08/2017 09:56 PM, Philippe Mathieu-Daudé wrote:
On 05/08/2017 08:56 PM, Eric Blake wrote:
On 05/08/2017 06:39 PM, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 include/hw/misc/unimp.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h
index 3462d85836..353ee19abf 100644
--- a/include/hw/misc/unimp.h
+++ b/include/hw/misc/unimp.h
@@ -8,6 +8,9 @@
 #ifndef HW_MISC_UNIMP_H
 #define HW_MISC_UNIMP_H

+#include "qemu/osdep.h"

NACK. .h files should not include osdep.h, because the .c file that is
using the .h file should have already done so.  This is mentioned in
HACKING.

Ok! Indeed my .c doesn't include osdep.h, sorry for the noise.

I attentively read the HACKING after a good night's sleep.

What about the other include, "hw/sysbus.h"?
The inlined function create_unimplemented_device() calls sysbus_mmio_map_overlap(). Anyone willing to use "hw/misc/unimp.h" will get a compilation failure if he does not include "hw/sysbus.h" and I don't think it belongs to "qemu/osdep.h".

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]