All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Cc: kwolf@redhat.com, borntraeger@de.ibm.com,
	Eric Blake <eblake@redhat.com>,
	qemu-block@nongnu.org, cornelia.huck@de.ibm.com,
	mreitz@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/3] coccinelle: Clean up error checks and return value variables
Date: Fri, 10 Jun 2016 17:12:15 -0300	[thread overview]
Message-ID: <1465589538-24998-1-git-send-email-ehabkost@redhat.com> (raw)

v2 of the previous "error: Remove NULL checks on
error_propagate() calls" patch, now it became a series.

Changes v1 -> v2:
* The Coccinelle scripts were simplified by using "when"
  constraints to detect when a variable is not used elsewhere
  inside the function.
* Added script to remove unnecessary variables for function
  return value.
* Coccinelle scripts added to scripts/coccinelle.

Eduardo Habkost (3):
  error: Remove NULL checks on error_propagate() calls
  error: Remove unnecessary local_err variables
  [RFC] Remove unnecessary variables for function return value

 audio/audio.c                                 | 10 ++-----
 block.c                                       | 26 ++++-------------
 block/archipelago.c                           |  4 +--
 block/qcow2-cluster.c                         |  7 ++---
 block/qcow2-refcount.c                        |  7 ++---
 block/qcow2.c                                 |  4 +--
 block/quorum.c                                |  4 +--
 block/raw-posix.c                             | 24 +++------------
 block/raw_bsd.c                               |  9 +-----
 block/rbd.c                                   |  5 +---
 block/snapshot.c                              |  4 +--
 block/vmdk.c                                  |  6 ++--
 block/vvfat.c                                 |  5 +---
 blockdev.c                                    | 26 +++++------------
 bootdevice.c                                  |  4 +--
 dump.c                                        |  4 +--
 hw/acpi/aml-build.c                           | 13 ++-------
 hw/audio/intel-hda.c                          |  5 +---
 hw/display/vga.c                              |  4 +--
 hw/ide/qdev.c                                 |  4 +--
 hw/intc/s390_flic_kvm.c                       |  5 ++--
 hw/net/ne2000-isa.c                           |  4 +--
 hw/pci-host/uninorth.c                        |  5 +---
 hw/ppc/spapr_vio.c                            |  7 +----
 hw/s390x/s390-virtio-ccw.c                    |  5 +---
 hw/s390x/virtio-ccw.c                         | 42 +++++----------------------
 hw/scsi/megasas.c                             | 10 +------
 hw/scsi/scsi-generic.c                        |  5 +---
 hw/timer/mc146818rtc.c                        |  5 +---
 hw/usb/dev-storage.c                          |  4 +--
 hw/virtio/virtio-pci.c                        |  4 +--
 linux-user/signal.c                           | 15 +++-------
 page_cache.c                                  |  5 +---
 qga/commands-posix.c                          |  4 +--
 qga/commands-win32.c                          | 14 ++-------
 qobject/qlist.c                               |  5 +---
 qom/object.c                                  |  4 +--
 scripts/coccinelle/error_propagate_null.cocci | 10 +++++++
 scripts/coccinelle/remove_local_err.cocci     | 27 +++++++++++++++++
 scripts/coccinelle/return_directly.cocci      | 19 ++++++++++++
 target-i386/cpu.c                             |  4 +--
 target-i386/fpu_helper.c                      | 10 ++-----
 target-i386/kvm.c                             |  5 ++--
 target-mips/dsp_helper.c                      | 15 ++--------
 target-mips/op_helper.c                       |  4 +--
 target-s390x/helper.c                         |  6 +---
 target-sparc/cc_helper.c                      | 25 ++++------------
 target-tricore/op_helper.c                    | 13 +++------
 tests/display-vga-test.c                      |  6 +---
 tests/endianness-test.c                       |  5 +---
 tests/i440fx-test.c                           |  4 +--
 tests/intel-hda-test.c                        |  6 +---
 tests/test-filter-redirector.c                |  6 +---
 tests/virtio-blk-test.c                       |  5 +---
 tests/virtio-console-test.c                   |  6 +---
 tests/virtio-net-test.c                       |  6 +---
 tests/virtio-scsi-test.c                      |  6 +---
 tests/wdt_ib700-test.c                        |  6 +---
 ui/cursor.c                                   | 10 ++-----
 ui/qemu-pixman.c                              | 11 ++-----
 util/module.c                                 |  6 +---
 vl.c                                          |  5 +---
 62 files changed, 160 insertions(+), 384 deletions(-)
 create mode 100644 scripts/coccinelle/error_propagate_null.cocci
 create mode 100644 scripts/coccinelle/remove_local_err.cocci
 create mode 100644 scripts/coccinelle/return_directly.cocci

-- 
2.5.5

             reply	other threads:[~2016-06-10 20:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 20:12 Eduardo Habkost [this message]
2016-06-10 20:12 ` [Qemu-devel] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls Eduardo Habkost
2016-06-10 20:54   ` Eric Blake
2016-06-13  7:41   ` Cornelia Huck
2016-06-10 20:12 ` [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables Eduardo Habkost
2016-06-10 20:59   ` Eric Blake
2016-06-10 22:39     ` Eduardo Habkost
2016-06-13  7:44   ` Cornelia Huck
2016-06-13 11:42   ` Markus Armbruster
2016-06-13 15:52     ` Eduardo Habkost
2016-06-13 16:01       ` [Qemu-devel] [Qemu-block] " Eric Blake
2016-06-13 18:49         ` Markus Armbruster
2016-06-13 19:42           ` Eduardo Habkost
2016-06-14  8:15             ` Markus Armbruster
2016-06-13 19:40         ` Eduardo Habkost
2016-06-10 20:12 ` [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value Eduardo Habkost
2016-06-10 21:22   ` Eric Blake
2016-06-13 11:29   ` Markus Armbruster
2016-06-13 21:40     ` Eduardo Habkost
2016-06-14  8:13       ` 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=1465589538-24998-1-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.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.