cocci: Do not initialize variable used by *FOREACH*() macro
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | cocci: Do not initialize variable used by QLIST_FOREACH macroblock/ block/ hw/ +5 more | +12 | 0 replies | |
| 2/8 | cocci: Do not initialize variable used by QSLIST_FOREACH macroebpf/ | +1 | 0 replies | |
| 3/8 | cocci: Do not initialize variable used by QSIMPLEQ_FOREACH macroblock/ migration/ | +2 | 0 replies | |
| 4/8 | cocci: Do not initialize variable used by QTAILQ_FOREACH macrohw/ hw/ net/ +2 more | +7 | 0 replies | |
| 5/8 | cocci: Do not initialize variable used by RAMBLOCK_FOREACH* macromigration/ | +2 | 0 replies | |
| 6/8 | cocci: Do not initialize variable used by CPU_FOREACH macrohw/ target/ target/ +1 more | +8 | 0 replies | |
| 7/8 | target/mips: Reduce CPUState scope when used with CPU_FOREACH()target/ target/ target/ | +25 | 0 replies | |
| 8/8 | target/riscv: Iterate vCPUs using CPU_FOREACH() macrohw/ | +5 | 0 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Pierrick Bouvier |
|---|---|
| Series | R-b |
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] cocci: Do not initialize variable used by *FOREACH*() macro
Most of our *FOREACH*() macros take a pointer argument, then assign it upon entry before iterating. Thus there is no need to initialize the variable used as argument. But sometimes we do, which is confusing (for example &first_cpu). This series uses a Coccinelle script to clean these unnecessary usages. (and 2 bonus cleanup patches at the end).
Philippe Mathieu-Daudé (8):
cocci: Do not initialize variable used by QLIST_FOREACH macro
cocci: Do not initialize variable used by QSLIST_FOREACH macro
cocci: Do not initialize variable used by QSIMPLEQ_FOREACH macro
cocci: Do not initialize variable used by QTAILQ_FOREACH macro
cocci: Do not initialize variable used by RAMBLOCK_FOREACH* macro
cocci: Do not initialize variable used by CPU_FOREACH macro target/mips: Reduce CPUState scope when used with CPU_FOREACH() target/riscv: Iterate vCPUs using CPU_FOREACH() macro
target/mips/internal.h | 11 ++++++----- block/blkdebug.c | 2 +- block/blkio.c | 2 +- block/gluster.c | 4 ++-- ebpf/ebpf.c | 2 +- hw/arm/virt-acpi-build.c | 2 +- hw/i386/xen/xen-hvm.c | 4 ++-- hw/misc/mips_cpc.c | 4 ++-- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_events.c | 4 ++-- hw/riscv/boot.c | 9 +++++---- hw/riscv/riscv-iommu.c | 2 +- hw/vfio/cpr-legacy.c | 2 +- hw/vfio/listener.c | 4 ++-- hw/xen/xen_pt_config_init.c | 4 ++-- migration/block-dirty-bitmap.c | 2 +- migration/dirtyrate.c | 4 ++-- net/colo-compare.c | 4 ++-- net/net.c | 2 +- target/mips/tcg/system/cp0_helper.c | 28 ++++++++++++++++------------ target/mips/tcg/system/tlb_helper.c | 7 +++---- target/s390x/kvm/stsi-topology.c | 2 +- 22 files changed, 56 insertions(+), 51 deletions(-)
Signature · 1 line
2.53.0