Tweak the semantic patch to drop redundant parenthesis around the
return expression.
Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored
manually.
Coccinelle messes up vmdk_co_create(), not sure why. Change dropped,
will be done manually in the next commit.
Line breaks in target/avr/cpu.h and hw/rdma/vmw/pvrdma_cmd.c tidied up
manually.
Whitespace in tools/virtiofsd/fuse_lowlevel.c tidied up manually.
checkpatch.pl complains "return of an errno should typically be -ve"
two times for hw/9pfs/9p-synth.c. Preexisting, the patch merely makes
it visible to checkpatch.pl.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/coccinelle/return_directly.cocci | 5 +--
include/hw/pci/pci.h | 7 +--
target/avr/cpu.h | 4 +-
hw/9pfs/9p-synth.c | 14 ++----
hw/char/sifive_uart.c | 4 +-
hw/ppc/ppc4xx_sdram.c | 5 +--
hw/rdma/vmw/pvrdma_cmd.c | 57 +++++++++---------------
hw/virtio/vhost-user.c | 6 +--
migration/dirtyrate.c | 10 +----
migration/tls.c | 6 +--
replay/replay-time.c | 5 +--
semihosting/console.c | 4 +-
softmmu/memory.c | 11 +----
softmmu/physmem.c | 9 +---
target/loongarch/cpu.c | 4 +-
target/mips/tcg/dsp_helper.c | 15 ++-----
target/riscv/debug.c | 6 +--
target/riscv/vector_helper.c | 28 +++---------
tests/bench/benchmark-crypto-akcipher.c | 6 +--
tests/qtest/erst-test.c | 5 +--
tests/qtest/hexloader-test.c | 6 +--
tests/qtest/pvpanic-pci-test.c | 6 +--
tests/qtest/pvpanic-test.c | 6 +--
tests/qtest/test-filter-mirror.c | 6 +--
tests/qtest/virtio-ccw-test.c | 6 +--
tests/tcg/multiarch/sha512.c | 9 +---
tools/virtiofsd/fuse_lowlevel.c | 24 +++-------
27 files changed, 70 insertions(+), 204 deletions(-)
diff --git a/scripts/coccinelle/return_directly.cocci
b/scripts/coccinelle/return_directly.cocci
index 4cf50e75ea..6cb1b3c99a 100644
--- a/scripts/coccinelle/return_directly.cocci
+++ b/scripts/coccinelle/return_directly.cocci
@@ -11,9 +11,8 @@ identifier F;
- T VAR;
... when != VAR
-- VAR =
-+ return
- E;
+- VAR = (E);
- return VAR;
++ return E;
... when != VAR
}