* [Qemu-devel] Fwd: [PATCH v2 4/5] Change return type of functions that are named *_exit or *_exitfn in hw/s390x from int to void
[not found] <1460485534-6116-1-git-send-email-nutanshinde1992@gmail.com>
@ 2016-04-12 18:27 ` Nutan Shinde
2016-04-13 10:46 ` [Qemu-devel] " Cornelia Huck
0 siblings, 1 reply; 2+ messages in thread
From: Nutan Shinde @ 2016-04-12 18:27 UTC (permalink / raw)
To: QEMU Developers, cornelia.huck, borntraeger, agraf, pbonzini
[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]
This change is required because the return type of exit(error) function is
not used.
This patch only has changes for files in hw/s390x package.
Signed-off-by: Nutan Shinde <nutanshinde1992@gmail.com>
---
hw/s390x/virtio-ccw.c | 7 +++----
hw/s390x/virtio-ccw.h | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index d51642d..e8b5a38 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -878,7 +878,7 @@ out_err:
g_free(sch);
}
-static int virtio_ccw_exit(VirtioCcwDevice *dev)
+static void virtio_ccw_exit(VirtioCcwDevice *dev)
{
SubchDev *sch = dev->sch;
@@ -890,7 +890,6 @@ static int virtio_ccw_exit(VirtioCcwDevice *dev)
release_indicator(&dev->routes.adapter, dev->indicators);
dev->indicators = NULL;
}
- return 0;
}
static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp)
@@ -1735,12 +1734,12 @@ static void virtio_ccw_busdev_realize(DeviceState
*dev, Error **errp)
virtio_ccw_device_realize(_dev, errp);
}
-static int virtio_ccw_busdev_exit(DeviceState *dev)
+static void virtio_ccw_busdev_exit(DeviceState *dev)
{
VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev;
VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
- return _info->exit(_dev);
+ _info->exit(_dev);
}
static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev,
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 66c831b..854602f 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -68,7 +68,7 @@ typedef struct VirtioCcwDevice VirtioCcwDevice;
typedef struct VirtIOCCWDeviceClass {
DeviceClass parent_class;
void (*realize)(VirtioCcwDevice *dev, Error **errp);
- int (*exit)(VirtioCcwDevice *dev);
+ void (*exit)(VirtioCcwDevice *dev);
} VirtIOCCWDeviceClass;
/* Performance improves when virtqueue kick processing is decoupled from
the
--
1.9.1
[-- Attachment #2: Type: text/html, Size: 2516 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/5] Change return type of functions that are named *_exit or *_exitfn in hw/s390x from int to void
2016-04-12 18:27 ` [Qemu-devel] Fwd: [PATCH v2 4/5] Change return type of functions that are named *_exit or *_exitfn in hw/s390x from int to void Nutan Shinde
@ 2016-04-13 10:46 ` Cornelia Huck
0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2016-04-13 10:46 UTC (permalink / raw)
To: Nutan Shinde; +Cc: QEMU Developers, borntraeger, agraf, pbonzini
On Tue, 12 Apr 2016 23:57:06 +0530
Nutan Shinde <nutanshinde1992@gmail.com> wrote:
> This change is required because the return type of exit(error) function is
> not used.
> This patch only has changes for files in hw/s390x package.
Some meta-notes (I saw the related discussion on qemu-devel; the
comments there apply to this patch as well):
- The change is not 'required'. It's a cleanup because everybody
returns 0 anyway.
- It often makes sense to cc: everybody on the cover letter so they can
find out what the series is about without needing to dig it up on the
mailing list.
- A patch series needs to preserve bisectability, i.e. at every point
in the series the code must compile.
To achieve this, it often makes sense to split out self-contained
changes restricted to a component (here: changes following from
VirtIOCCWDeviceClass changes) from whole-tree changes (here: changes
following from DeviceClass).
>
> Signed-off-by: Nutan Shinde <nutanshinde1992@gmail.com>
> ---
> hw/s390x/virtio-ccw.c | 7 +++----
> hw/s390x/virtio-ccw.h | 2 +-
> 2 files changed, 4 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-13 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1460485534-6116-1-git-send-email-nutanshinde1992@gmail.com>
2016-04-12 18:27 ` [Qemu-devel] Fwd: [PATCH v2 4/5] Change return type of functions that are named *_exit or *_exitfn in hw/s390x from int to void Nutan Shinde
2016-04-13 10:46 ` [Qemu-devel] " Cornelia Huck
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.