All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@linux.intel.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Eduardo Habkost <eduardo@habkost.net>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Yanan Wang <wangyanan55@huawei.com>,
	qemu-devel@nongnu.org, Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH 02/11] hw/core: Cleanup unused included headers in cpu-common.c
Date: Tue, 16 Jan 2024 00:36:11 +0800	[thread overview]
Message-ID: <ZaVe++YmoG4Pmy18@intel.com> (raw)
In-Reply-To: <06d4179f-76b8-42f0-b147-f4bc2d1f06bd@linaro.org>

On Mon, Jan 15, 2024 at 05:07:52PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon, 15 Jan 2024 17:07:52 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: Re: [PATCH 02/11] hw/core: Cleanup unused included headers in
>  cpu-common.c
> 
> On 15/1/24 15:45, Zhao Liu wrote:
> > Hi Peter,
> > 
> > On Mon, Jan 15, 2024 at 10:41:48AM +0000, Peter Maydell wrote:
> > > Date: Mon, 15 Jan 2024 10:41:48 +0000
> > > From: Peter Maydell <peter.maydell@linaro.org>
> > > Subject: Re: [PATCH 02/11] hw/core: Cleanup unused included headers in
> > >   cpu-common.c
> > > 
> > > On Mon, 15 Jan 2024 at 09:37, Zhao Liu <zhao1.liu@linux.intel.com> wrote:
> > > > 
> > > > From: Zhao Liu <zhao1.liu@intel.com>
> > > > 
> > > > Remove unused headers in cpu-common.c:
> > > > * qemu/notify.h
> > > > * qemu/log.h
> > > > * qemu/main-loop.h
> > > > * exec/cpu-common.h
> > > > * qemu/error-report.h
> > > > * qemu/qemu-print.h
> > > > 
> > > > Though hw/core/cpu.h has been included by sysemu/hw_accel.h, to keep
> > > > the dependency clear, still directly include hw/core/cpu.h in this file.
> > > > 
> > > > Tested by "./configure" and then "make".
> > > > 
> > > > Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> > > > ---
> > > >   hw/core/cpu-common.c | 7 +------
> > > >   1 file changed, 1 insertion(+), 6 deletions(-)
> > > 
> > > Something seems to be wrong with your analysis of what
> > > includes it is OK to drop. For instance, this file uses
> > > the function qemu_log(), which is why it includes
> > > qemu/log.h.
> > > 
> > 
> > I'm not sure about this, since qemu/log.h has been included by exec/log.h,
> > so could we just include exec/log.h and omit qemu/log.h in this file?
> 
> We try to avoid implicit header inclusions, because if "exec/log.h" is
> reworked and "qemu/log.h" removed, then files using declarations
> implicitly declared start to fail building, and we need to clean
> unrelated files.

Thanks! I see. Let me rework this series.

Regards,
Zhao



  reply	other threads:[~2024-01-15 16:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15  9:48 [PATCH 00/11] hw/core: Cleanup and reorder headers Zhao Liu
2024-01-15  9:48 ` [PATCH 01/11] MAINTAINERS: Update hw/core/cpu.c entry Zhao Liu
2024-01-15 11:09   ` Philippe Mathieu-Daudé
2024-01-15  9:48 ` [PATCH 02/11] hw/core: Cleanup unused included headers in cpu-common.c Zhao Liu
2024-01-15 10:41   ` Peter Maydell
2024-01-15 14:45     ` Zhao Liu
2024-01-15 16:07       ` Philippe Mathieu-Daudé
2024-01-15 16:36         ` Zhao Liu [this message]
2024-01-15  9:48 ` [PATCH 03/11] hw/core: Reorder " Zhao Liu
2024-01-15  9:48 ` [PATCH 04/11] hw/core: Reorder included headers in cpu-sysemu.c Zhao Liu
2024-01-15  9:48 ` [PATCH 05/11] hw/core: Cleanup unused included headers in machine-qmp-cmds.c Zhao Liu
2024-01-15  9:48 ` [PATCH 06/11] hw/core: Cleanup unused included header in machine.c Zhao Liu
2024-01-15  9:48 ` [PATCH 07/11] hw/core: Reorder " Zhao Liu
2024-01-15  9:48 ` [PATCH 08/11] hw/core: Cleanup unnecessary included header in null-machine.c Zhao Liu
2024-01-15  9:48 ` [PATCH 09/11] hw/core: Reorder included headers " Zhao Liu
2024-01-15  9:48 ` [PATCH 10/11] hw/core: Cleanup unused included headers in numa.c Zhao Liu
2024-01-15  9:48 ` [PATCH 11/11] hw/core: Reorder " Zhao Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZaVe++YmoG4Pmy18@intel.com \
    --to=zhao1.liu@linux.intel.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.