qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public


From: BALATON Zoltan
Subject: Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public
Date: Mon, 4 May 2020 14:12:59 +0200 (CEST)
User-agent: Alpine 2.22 (BSF 395 2020-01-19)

On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
On 5/4/20 12:12 PM, Philippe Mathieu-Daudé wrote:
On 5/4/20 10:48 AM, BALATON Zoltan wrote:
On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
As target-specific code use this header, move it to the publicly
accessible include/ folder.

 $ git grep hw/usb/hcd-ehci.h
 hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
 hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
 hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
 include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
 include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"

All of these only need either the type #define or EHCISysBusState so splitting only those off to a public header should be enough and better than making public all of ehci's internal header.

Ah you mean forward-declare EHCISysBusState in "qemu/typedefs.h", OK.

It won't work because AspeedSoCState and AwA10State use the full structure (not a pointer to it).

I've meant splitting the internal header into a public one only containing the EHCISysBusState struct definition and TYPE_* #defines (or those could be replaced with string value where used as done at several other places to reduce dependence on this header). These are the only parts which used outside hcd-ehci. All other internal stuff would remain in internal header where they belong.

AwA10State also uses OHCISysBusState, why doesn't that have the same problem? Why no other models need this? could this be really a problem with these two models?

Regards,
BALATON Zoltan

reply via email to

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