Change return type of functions that are named *_exit or *_exitfn in hw/ from int to void
PATCH v2 1/5 Change return type of functions that are named *_exit or *_exitfn in hw/ from int to void
In reply to a message not in the archiveThis changes is required because the return type of exit(error) function is not used.
This patch only has changes for files in hw/audio package.
Signed-off-by Nutan Shinde <[email protected]>
--- hw/audio/hda-codec.c | 3 +-- hw/audio/intel-hda.c | 3 +-- hw/audio/intel-hda.h | 2 +- include/hw/qdev-core.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-)
hw/audio/hda-codec.c +0 -0
@@ -520,7 +520,7 @@ static int hda_audio_init(HDACodecDevice *hda, const
struct desc_codec *desc)
return 0;
}
-static int hda_audio_exit(HDACodecDevice *hda)
+static void hda_audio_exit(HDACodecDevice *hda)
{
HDAAudioState *a = HDA_AUDIO(hda);
HDAAudioStream *st;
@@ -539,7 +539,6 @@ static int hda_audio_exit(HDACodecDevice *hda)
}
}
AUD_remove_card(&a->card);- return 0;
}
static int hda_audio_post_load(void *opaque, int version)
hw/audio/intel-hda.c +1 -2
@@ -66,7 +66,7 @@ static int hda_codec_dev_init(DeviceState *qdev)return cdc->init (dev); } -static int hda_codec_dev_exit (DeviceState *qdev) +static void hda_codec_dev_exit (DeviceState *qdev) {HDACodecDevice *dev =DO_UPCAST (HDACodecDevice, qdev, qdev);HDACodecDeviceClass *cdc =HDA_CODEC_DEVICE_GET_CLASS (dev);
@@ -74,7 +74,6 @@ static int hda_codec_dev_exit(DeviceState *qdev)if (cdc->exit) { cdc->exit (dev); } -return 0 ; }HDACodecDevice *hda_codec_find (HDACodecBus *bus,uint32_t cad)
hw/audio/intel-hda.h +1 -1
@@ -38,7 +38,7 @@ typedef struct HDACodecDeviceClassDeviceClass parent_class;int (*init)(HDACodecDevice *dev); -int (*exit)(HDACodecDevice *dev); +void (*exit)(HDACodecDevice *dev);void (*command)(HDACodecDevice *dev,uint32_t nid,uint32_t data); void (*stream)(HDACodecDevice *dev, uint32_t stnr, bool running, bool
output);
} HDACodecDeviceClass;
include/hw/qdev-core.h +1 -1
@@ -30,7 +30,7 @@ typedef enum DeviceCategory { } DeviceCategory;typedef int (*qdev_initfn )(DeviceState *dev); -typedef int (*qdev_event )(DeviceState *dev); +typedef void (*qdev_event )(DeviceState *dev);typedef void (*qdev_resetfn )(DeviceState *dev);typedef void (*DeviceRealize )(DeviceState *dev,Error **errp);typedef void (*DeviceUnrealize )(DeviceState *dev,Error **errp);
--
1.9.1