From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: groug@kaod.org, qemu_oss@crudebyte.com, Alistair.Francis@wdc.com,
bin.meng@windriver.com, palmer@dabbelt.com,
marcandre.lureau@redhat.com, pbonzini@redhat.com,
yuval.shaia.ml@gmail.com, marcel.apfelbaum@gmail.com,
mst@redhat.com, quintela@redhat.com, dgilbert@redhat.com,
pavel.dovgaluk@ispras.ru, alex.bennee@linaro.org,
peterx@redhat.com, david@redhat.com, mrolnik@gmail.com,
gaosong@loongson.cn, yangxiaojuan@loongson.cn,
aurelien@aurel32.net, jiaxun.yang@flygoat.com,
aleksandar.rikalo@syrmia.com, berrange@redhat.com,
thuth@redhat.com, lvivier@redhat.com, suhang16@mails.ucas.ac.cn,
chen.zhang@intel.com, lizhijian@fujitsu.com, stefanha@redhat.com,
qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, virtio-fs@redhat.com
Subject: Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci
Date: Tue, 22 Nov 2022 16:10:39 +0100 [thread overview]
Message-ID: <58463615-23ab-5f08-de12-ccc5587040d6@linaro.org> (raw)
In-Reply-To: <20221122134917.1217307-2-armbru@redhat.com>
On 22/11/22 14:49, Markus Armbruster wrote:
> 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
> }
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-11-22 15:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 13:49 [PATCH v2 0/2] cleanup: Tweak and re-run return_directly.cocci Markus Armbruster
2022-11-22 13:49 ` [PATCH v2 1/2] " Markus Armbruster
2022-11-22 14:06 ` BALATON Zoltan
2022-11-22 15:48 ` Markus Armbruster
2022-11-22 15:10 ` Philippe Mathieu-Daudé [this message]
2022-11-24 14:24 ` Dr. David Alan Gilbert
2022-11-24 15:15 ` Greg Kurz
2022-11-24 15:24 ` Greg Kurz
2022-11-24 18:41 ` Markus Armbruster
2022-11-22 13:49 ` [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly Markus Armbruster
2022-11-22 13:52 ` Peter Maydell
2022-11-22 15:05 ` Philippe Mathieu-Daudé
2022-11-23 7:06 ` [PATCH 3/2] ppc4xx_sdram: Simplify sdram_ddr_size() to return Markus Armbruster
2022-11-23 10:44 ` BALATON Zoltan
2022-11-23 11:12 ` Markus Armbruster
2022-11-23 11:17 ` 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=58463615-23ab-5f08-de12-ccc5587040d6@linaro.org \
--to=philmd@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=aleksandar.rikalo@syrmia.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=bin.meng@windriver.com \
--cc=chen.zhang@intel.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=gaosong@loongson.cn \
--cc=groug@kaod.org \
--cc=jiaxun.yang@flygoat.com \
--cc=lizhijian@fujitsu.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mrolnik@gmail.com \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=suhang16@mails.ucas.ac.cn \
--cc=thuth@redhat.com \
--cc=virtio-fs@redhat.com \
--cc=yangxiaojuan@loongson.cn \
--cc=yuval.shaia.ml@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).