qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/virt: remove unused header fi


From: Hongbo Zhang
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/virt: remove unused header files
Date: Tue, 6 Nov 2018 18:26:42 +0800

On 5 November 2018 at 21:26, Auger Eric <address@hidden> wrote:
> Hi Hongbo,
>
> On 10/23/18 12:21 PM, Hongbo Zhang wrote:
>> Well, after checking manually, the header files
>> "hw/arm/primecell.h"
>> "qapi/visitor.h"
>> "hw/arm/smmuv3.h"
>> are really not used in virt.c, still can be removed.
>>
>> On 22 October 2018 at 18:17, Hongbo Zhang <address@hidden> wrote:
>>> On 22 October 2018 at 09:37, Hongbo Zhang <address@hidden> wrote:
>>>> On 19 October 2018 at 19:59, Peter Maydell <address@hidden> wrote:
>>>>> On 19 October 2018 at 11:18, Hongbo Zhang <address@hidden> wrote:
>>>>>> Remove the unused herder files, 'virt' can be compiled and run without
>>>>>> including them.
>>>>>>
>>>>>> Signed-off-by: Hongbo Zhang <address@hidden>
>>>>>> ---
>>>>>>  hw/arm/virt.c | 8 --------
>>>>>>  1 file changed, 8 deletions(-)
>>>>>>
>>>>>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>>>>>> index 9f67782..f0066cb 100644
>>>>>> --- a/hw/arm/virt.c
>>>>>> +++ b/hw/arm/virt.c
>>>>>> @@ -30,9 +30,6 @@
>>>>>>
>>>>>>  #include "qemu/osdep.h"
>>>>>>  #include "qapi/error.h"
>>>>>> -#include "hw/sysbus.h"
>>>>>> -#include "hw/arm/arm.h"
>>>>>> -#include "hw/arm/primecell.h"
>>>>>
>>>>> Dropping primecell.h makes sense, we don't use what it provides.
>>>>> But I suspect the others are "unused" only because some other
>>>>> header we include drags them in implicitly. I think it's better
>>>>> to explicitly include what we need, in case that other header
>>>>> changes in future.
>>>>>
>>> I think at least another "hw/arm/smmuv3.h" can be removed too, even if
>>> we want to explicit including.
> Yes I think you can safely remove this one.
>
Thanks.

As my summary, I think these three can be removed,
"hw/arm/primecell.h"
"qapi/visitor.h"
"hw/arm/smmuv3.h"
Peter confirmed the first, Auger confirmed the third, anybody has
comments for the second? so that I can send out a v2 for this.

> Thanks
>
> Eric
>>> Will check others one by one.
>>>
>>>>> How did you determine which #includes to drop here?
>>>>>
>>>> Well, while I was working on the 'sbsa-ref' machine, I believed I
>>>> could remove some header files because I deleted some functions for
>>>> that platform, so I did.
>>>> And later, I thought I can try to test to remove part of what I did
>>>> for 'sbsa-ref' for 'virt' too, tests showed me that 'virt'  can be
>>>> compiled and run without them.
>>>>
>>>>> thanks
>>>>> -- PMM
>>



reply via email to

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