From: Markus Armbruster <armbru@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, marcel.apfelbaum@gmail.com,
jonathan.cameron@huawei.com, philmd@linaro.org
Subject: Re: [PATCH 1/5] include/hw/pci: Clean up superfluous inclusion of pci*/*.h cxl/*.h
Date: Sat, 10 Dec 2022 08:25:28 +0100 [thread overview]
Message-ID: <87359nbtzr.fsf@pond.sub.org> (raw)
In-Reply-To: <20221209120234-mutt-send-email-mst@kernel.org> (Michael S. Tsirkin's message of "Fri, 9 Dec 2022 12:03:51 -0500")
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Fri, Dec 09, 2022 at 02:47:58PM +0100, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> Thanks!
> How can I verify this is correct, i.e. that none
> of the headers that we remove is actually needed?
I think the pragmatic way forward is to let the compiler check.
"But how can we be confident the compiler's check is complete?" you
might ask. So let's consider how it could be incomplete.
Any .c that (transitively) includes one of the headers that now include
less could be affected.
* Test builds fail to compile such a .c.
To actually miss a problem, the code not covered must use something
from a header that is no longer included.
* Test builds compile such a .c, but fail to cover all build
configurations.
To actually miss a problem, the conditional code not covered must use
something from a header that is no longer included.
* Test builds silently miscompile such a .c, i.e. the build succeeds,
"make check" passes, but the generated code is wrong.
For this, the code must use something from a header that is no longer
included *and* it still needs to make sense to the compiler. Seems
far-fetched to me, except for #ifdef FOO where FOO comes from such a
header.
In my opinion, breaking something not covered by CI and in a way that is
trivial to fix doesn't really matter.
In addition to building various configurations, I tested that each
affected header compiles on its own, by compiling
#include "qemu/osdep.h"
#include THE_HEADER
There are two failures, hw/cxl/cxl_device.h and include/hw/pci/pcie.h,
but they both fail before this patch as well, and they don't fail
anymore at the end of this series.
Anything else you'd like me to do?
next prev parent reply other threads:[~2022-12-10 7:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 13:47 [PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes Markus Armbruster
2022-12-09 13:47 ` [PATCH 1/5] include/hw/pci: Clean up superfluous inclusion of pci*/*.h cxl/*.h Markus Armbruster
2022-12-09 17:03 ` Michael S. Tsirkin
2022-12-10 7:25 ` Markus Armbruster [this message]
2022-12-12 10:41 ` Jonathan Cameron via
2022-12-15 7:14 ` Markus Armbruster
2022-12-15 17:38 ` Jonathan Cameron via
2022-12-09 13:47 ` [PATCH 2/5] include/hw/cxl: Include hw/cxl/*.h where needed Markus Armbruster
2022-12-12 10:33 ` Jonathan Cameron via
2022-12-09 13:48 ` [PATCH 3/5] include/hw/pci: Clean up a few things checkpatch.pl would flag Markus Armbruster
2022-12-09 14:15 ` Philippe Mathieu-Daudé
2022-12-09 13:48 ` [PATCH 4/5] include/hw/pci: Split pci_device.h off pci.h Markus Armbruster
2022-12-21 11:33 ` Michael S. Tsirkin
2022-12-22 9:35 ` Markus Armbruster
2022-12-09 13:48 ` [PATCH 5/5] include/hw/pci: Include hw/pci/pci.h where needed Markus Armbruster
2022-12-09 14:17 ` Philippe Mathieu-Daudé
2022-12-09 15:11 ` [PATCH 6/5] include/hw/cxl: Break inclusion loop Markus Armbruster
2022-12-10 7:09 ` Markus Armbruster
2022-12-12 10:54 ` Jonathan Cameron via
2022-12-15 7:34 ` Markus Armbruster
2022-12-15 17:45 ` Jonathan Cameron via
2022-12-21 11:34 ` [PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes Michael S. Tsirkin
2022-12-22 7:02 ` Markus Armbruster
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=87359nbtzr.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=jonathan.cameron@huawei.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.