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: Eduardo Habkost <eduardo@habkost.net>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Yanan Wang <wangyanan55@huawei.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH v3 1/3] hw/core: Cleanup unused included headers in cpu-common.c
Date: Tue, 12 Mar 2024 10:17:29 +0800	[thread overview]
Message-ID: <Ze+7OTO9BTe/WSSf@intel.com> (raw)
In-Reply-To: <0297cf9b-4591-4622-96b0-83dae349dc1f@linaro.org>

> > Thanks for helpping me verify this!!
> > 
> > EMM, but I'm still not understanding how this approach distinguishes
> > whether hw/core/cpu-common.c needs the header (include/exec/cpu-common.h)
> > directly or just include/exec/memory.h needs that header? For the latter,
> > the header needn't be included in .c file.
> 
> Yes, you are right, it might not be necessary.
> 
> For all other headers in your series I checked that no function /
> definition is used in the source, but "exec/cpu-common.h" is too
> big to do that manually.

Thanks! I checked manually as well... In the future I'll also think
about if there's a more elegant way to do it.

> I mostly skipped it because it is odd to
> have cpu-common.c not including the header with the same name...

Yes, I think the "cpu-common.c" is the related .c file of
exec/cpu-common.h.

And the related header of "hw/core/cpu-common.c" should be
"hw/core/cpu.h".

Could we rename "hw/core/cpu-common.c" to "hw/core/cpu.c"? Then the
relationship could be clear.

> Also, in another series I split / reworked "exec/cpu-common.h" and
> IIRC a part of it will be included here. Bah, I'll stop writing
> and take your patch unmodified.

Many thanks!

Regards,
Zhao


  reply	other threads:[~2024-03-12  2:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  7:56 [PATCH v3 0/3] hw/core: Cleanup and reorder headers Zhao Liu
2024-03-11  7:56 ` [PATCH v3 1/3] hw/core: Cleanup unused included headers in cpu-common.c Zhao Liu
2024-03-11 11:40   ` Philippe Mathieu-Daudé
2024-03-11 11:44     ` Philippe Mathieu-Daudé
2024-03-11 15:44     ` Zhao Liu
2024-03-11 18:26       ` Philippe Mathieu-Daudé
2024-03-12  2:17         ` Zhao Liu [this message]
2024-03-11  7:56 ` [PATCH v3 2/3] hw/core: Cleanup unused included header in machine-qmp-cmds.c Zhao Liu
2024-03-11  8:52   ` Philippe Mathieu-Daudé
2024-03-11  7:56 ` [PATCH v3 3/3] hw/core: Cleanup unused included headers in numa.c Zhao Liu
2024-03-11  8:50   ` Philippe Mathieu-Daudé
2024-03-11 11:40 ` [PATCH v3 0/3] hw/core: Cleanup and reorder headers Philippe Mathieu-Daudé

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=Ze+7OTO9BTe/WSSf@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=thuth@redhat.com \
    --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.