From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJf9U-0006Hp-Mo for qemu-devel@nongnu.org; Mon, 05 Nov 2018 08:42:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJete-0001fY-5G for qemu-devel@nongnu.org; Mon, 05 Nov 2018 08:26:27 -0500 References: <1539944335-19556-1-git-send-email-hongbo.zhang@linaro.org> From: Auger Eric Message-ID: <5f1373d9-7f43-a481-3f12-44ed0ff2e311@redhat.com> Date: Mon, 5 Nov 2018 14:26:15 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: remove unused header files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hongbo Zhang , Peter Maydell Cc: qemu-arm , =?UTF-8?Q?Alex_Benn=c3=a9e?= , QEMU Developers 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 wrote: >> On 22 October 2018 at 09:37, Hongbo Zhang wrote: >>> On 19 October 2018 at 19:59, Peter Maydell wrote: >>>> On 19 October 2018 at 11:18, Hongbo Zhang wrote: >>>>> Remove the unused herder files, 'virt' can be compiled and run without >>>>> including them. >>>>> >>>>> Signed-off-by: Hongbo Zhang >>>>> --- >>>>> 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 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 >