[PATCH 0/9] clean-includes: improve exclude list, run on cxl, vfio, tests

Peter Maydell posted 9 patches 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251104160943.751997-1-peter.maydell@linaro.org
Maintainers: Jonathan Cameron <jonathan.cameron@huawei.com>, Fan Ni <fan.ni@samsung.com>, John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, Alex Williamson <alex@shazbot.org>, Thomas Huth <thuth@redhat.com>, Steve Sistare <steven.sistare@oracle.com>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Aditya Gupta <adityag@linux.ibm.com>, Glenn Miles <milesg@linux.ibm.com>, "Daniel P. Berrangé" <berrange@redhat.com>
hw/vfio-user/container.h             |  1 -
hw/vfio-user/device.h                |  1 -
hw/vfio/pci-quirks.h                 |  1 -
tests/qtest/aspeed-hace-utils.h      |  1 -
tests/qtest/aspeed-smc-utils.h       |  1 -
hw/cxl/cxl-mailbox-utils.c           |  2 +-
hw/mem/cxl_type3.c                   |  2 +-
hw/vfio-user/container.c             |  2 +-
hw/vfio-user/pci.c                   |  2 +-
hw/vfio/ap.c                         |  1 -
hw/vfio/container.c                  |  2 +-
hw/vfio/cpr-legacy.c                 |  2 +-
tests/qtest/aspeed_gpio-test.c       |  1 -
tests/qtest/dbus-display-test.c      |  3 -
tests/qtest/pnv-spi-seeprom-test.c   |  1 -
tests/unit/test-cutils.c             |  2 +-
tests/unit/test-error-report.c       |  1 -
tests/unit/test-io-channel-command.c |  2 -
scripts/clean-includes               | 88 ++++++++++++++++++----------
19 files changed, 63 insertions(+), 53 deletions(-)
[PATCH 0/9] clean-includes: improve exclude list, run on cxl, vfio, tests
Posted by Peter Maydell 1 week, 4 days ago
I realised that we haven't run clean-includes recently, and
unsurprisingly various violations of our include policy have
crept in to the tree. The exclude-list of files it shouldn't
be run on has also grown rather out of date.

While looking at this I realised that one reason the exclude list
is stale is that it's encoded in the script in a really awkward
single long line extended regex. So the main thing this patch
series does is fix that to instead use a list of regexes, one
per line, with comments permitted.

The other useful new feature here is that you can now point
the script at a directory (previously your only options were
an explicit list of files, or '--all' to scan everything).

The other changes to the script itself are minor cleanups.

Finally, I have a couple of patches which are the result of
running the script on some subdirectories. I do think that all
the changes that the script now suggests are correct (it wants
to make changes to 28 files other than these) but I wanted to
get the script changes through review first, and then perhaps
send those last changes a bit more broken up per-subsystem.

thanks
-- PMM

Peter Maydell (9):
  scripts/clean-includes: Allow directories on command line
  scripts/clean-includes: Remove outdated comment
  scripts/clean-includes: Make ignore-regexes one per line
  scripts/clean-includes: Do all our exclusions with REGEXFILE
  scripts/clean-includes: Give the args in git commit messages
  scripts/clean-includes: Update exclude list
  cxl: Clean up includes
  vfio: Clean up includes
  tests: Clean up includes

 hw/vfio-user/container.h             |  1 -
 hw/vfio-user/device.h                |  1 -
 hw/vfio/pci-quirks.h                 |  1 -
 tests/qtest/aspeed-hace-utils.h      |  1 -
 tests/qtest/aspeed-smc-utils.h       |  1 -
 hw/cxl/cxl-mailbox-utils.c           |  2 +-
 hw/mem/cxl_type3.c                   |  2 +-
 hw/vfio-user/container.c             |  2 +-
 hw/vfio-user/pci.c                   |  2 +-
 hw/vfio/ap.c                         |  1 -
 hw/vfio/container.c                  |  2 +-
 hw/vfio/cpr-legacy.c                 |  2 +-
 tests/qtest/aspeed_gpio-test.c       |  1 -
 tests/qtest/dbus-display-test.c      |  3 -
 tests/qtest/pnv-spi-seeprom-test.c   |  1 -
 tests/unit/test-cutils.c             |  2 +-
 tests/unit/test-error-report.c       |  1 -
 tests/unit/test-io-channel-command.c |  2 -
 scripts/clean-includes               | 88 ++++++++++++++++++----------
 19 files changed, 63 insertions(+), 53 deletions(-)

-- 
2.43.0