From patchwork Tue Aug 11 00:31:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 31115 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4E6B4B6F20 for ; Tue, 11 Aug 2009 10:35:55 +1000 (EST) Received: from localhost ([127.0.0.1]:46383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MafLD-0001uv-Ry for incoming@patchwork.ozlabs.org; Mon, 10 Aug 2009 20:35:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MafIx-0000ge-TZ for qemu-devel@nongnu.org; Mon, 10 Aug 2009 20:33:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MafIu-0000dw-1u for qemu-devel@nongnu.org; Mon, 10 Aug 2009 20:33:31 -0400 Received: from [199.232.76.173] (port=43314 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MafIt-0000dr-FG for qemu-devel@nongnu.org; Mon, 10 Aug 2009 20:33:27 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53677) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MafIs-0007Iv-KJ for qemu-devel@nongnu.org; Mon, 10 Aug 2009 20:33:27 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7B0XQEn030886 for ; Mon, 10 Aug 2009 20:33:26 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7B0XP3v006610; Mon, 10 Aug 2009 20:33:25 -0400 Received: from localhost.localdomain (vpn-12-132.rdu.redhat.com [10.11.12.132]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7B0XMaD016692; Mon, 10 Aug 2009 20:33:23 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 11 Aug 2009 02:31:14 +0200 Message-Id: <2544932ac2992a91f4beecd0865ba84d7889a709.1249950639.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH 1/4] Use proper struct initializers and remove INIT_FIELD() macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- audio/alsaaudio.c | 22 +++++++++++----------- audio/audio_int.h | 2 -- audio/coreaudio.c | 23 +++++++++++------------ audio/dsoundaudio.c | 23 +++++++++++------------ audio/esdaudio.c | 23 +++++++++++------------ audio/fmodaudio.c | 22 +++++++++++----------- audio/noaudio.c | 22 +++++++++++----------- audio/ossaudio.c | 22 +++++++++++----------- audio/paaudio.c | 22 +++++++++++----------- audio/sdlaudio.c | 22 +++++++++++----------- audio/wavaudio.c | 23 +++++++++++------------ 11 files changed, 110 insertions(+), 116 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 5a49eb5..61a8cd0 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -983,15 +983,15 @@ static struct audio_pcm_ops alsa_pcm_ops = { }; struct audio_driver alsa_audio_driver = { - INIT_FIELD (name = ) "alsa", - INIT_FIELD (descr = ) "ALSA http://www.alsa-project.org", - INIT_FIELD (options = ) alsa_options, - INIT_FIELD (init = ) alsa_audio_init, - INIT_FIELD (fini = ) alsa_audio_fini, - INIT_FIELD (pcm_ops = ) &alsa_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (ALSAVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (ALSAVoiceIn) + .name = "alsa", + .descr = "ALSA http://www.alsa-project.org", + .options = alsa_options, + .init = alsa_audio_init, + .fini = alsa_audio_fini, + .pcm_ops = &alsa_pcm_ops, + .can_be_default = 1, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (ALSAVoiceOut), + .voice_size_in = sizeof (ALSAVoiceIn) }; diff --git a/audio/audio_int.h b/audio/audio_int.h index 0abed38..f3cd0be 100644 --- a/audio/audio_int.h +++ b/audio/audio_int.h @@ -232,11 +232,9 @@ static inline int audio_ring_dist (int dst, int src, int len) #if defined __GNUC__ #define GCC_ATTR __attribute__ ((__unused__, __format__ (__printf__, 1, 2))) -#define INIT_FIELD(f) . f #define GCC_FMT_ATTR(n, m) __attribute__ ((__format__ (__printf__, n, m))) #else #define GCC_ATTR /**/ -#define INIT_FIELD(f) /**/ #define GCC_FMT_ATTR(n, m) #endif diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 9671429..c46b357 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -535,16 +535,15 @@ static struct audio_pcm_ops coreaudio_pcm_ops = { }; struct audio_driver coreaudio_audio_driver = { - INIT_FIELD (name = ) "coreaudio", - INIT_FIELD (descr = ) - "CoreAudio http://developer.apple.com/audio/coreaudio.html", - INIT_FIELD (options = ) coreaudio_options, - INIT_FIELD (init = ) coreaudio_audio_init, - INIT_FIELD (fini = ) coreaudio_audio_fini, - INIT_FIELD (pcm_ops = ) &coreaudio_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) 1, - INIT_FIELD (max_voices_in = ) 0, - INIT_FIELD (voice_size_out = ) sizeof (coreaudioVoiceOut), - INIT_FIELD (voice_size_in = ) 0 + .name = "coreaudio", + .descr = "CoreAudio http://developer.apple.com/audio/coreaudio.html", + .options = coreaudio_options, + .init = coreaudio_audio_init, + .fini = coreaudio_audio_fini, + .pcm_ops = &coreaudio_pcm_ops, + .can_be_default = 1, + .max_voices_out = 1, + .max_voices_in = 0, + .voice_size_out = sizeof (coreaudioVoiceOut), + .voice_size_in = 0 }; diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index a78c856..7c08790 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -1073,16 +1073,15 @@ static struct audio_pcm_ops dsound_pcm_ops = { }; struct audio_driver dsound_audio_driver = { - INIT_FIELD (name = ) "dsound", - INIT_FIELD (descr = ) - "DirectSound http://wikipedia.org/wiki/DirectSound", - INIT_FIELD (options = ) dsound_options, - INIT_FIELD (init = ) dsound_audio_init, - INIT_FIELD (fini = ) dsound_audio_fini, - INIT_FIELD (pcm_ops = ) &dsound_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) 1, - INIT_FIELD (voice_size_out = ) sizeof (DSoundVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (DSoundVoiceIn) + .name = "dsound", + .descr = "DirectSound http://wikipedia.org/wiki/DirectSound", + .options = dsound_options, + .init = dsound_audio_init, + .fini = dsound_audio_fini, + .pcm_ops = &dsound_pcm_ops, + .can_be_default = 1, + .max_voices_out = INT_MAX, + .max_voices_in = 1, + .voice_size_out = sizeof (DSoundVoiceOut), + .oice_size_in = sizeof (DSoundVoiceIn) }; diff --git a/audio/esdaudio.c b/audio/esdaudio.c index 0102c5a..ff6725e 100644 --- a/audio/esdaudio.c +++ b/audio/esdaudio.c @@ -581,16 +581,15 @@ static struct audio_pcm_ops qesd_pcm_ops = { }; struct audio_driver esd_audio_driver = { - INIT_FIELD (name = ) "esd", - INIT_FIELD (descr = ) - "http://en.wikipedia.org/wiki/Esound", - INIT_FIELD (options = ) qesd_options, - INIT_FIELD (init = ) qesd_audio_init, - INIT_FIELD (fini = ) qesd_audio_fini, - INIT_FIELD (pcm_ops = ) &qesd_pcm_ops, - INIT_FIELD (can_be_default = ) 0, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (ESDVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (ESDVoiceIn) + .name = "esd", + .descr = "http://en.wikipedia.org/wiki/Esound", + .options = qesd_options, + .init = qesd_audio_init, + .fini = qesd_audio_fini, + .pcm_ops = &qesd_pcm_ops, + .can_be_default = 0, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (ESDVoiceOut), + .voice_size_in = sizeof (ESDVoiceIn) }; diff --git a/audio/fmodaudio.c b/audio/fmodaudio.c index 0becd3b..8259551 100644 --- a/audio/fmodaudio.c +++ b/audio/fmodaudio.c @@ -672,15 +672,15 @@ static struct audio_pcm_ops fmod_pcm_ops = { }; struct audio_driver fmod_audio_driver = { - INIT_FIELD (name = ) "fmod", - INIT_FIELD (descr = ) "FMOD 3.xx http://www.fmod.org", - INIT_FIELD (options = ) fmod_options, - INIT_FIELD (init = ) fmod_audio_init, - INIT_FIELD (fini = ) fmod_audio_fini, - INIT_FIELD (pcm_ops = ) &fmod_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (FMODVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (FMODVoiceIn) + .name = "fmod", + .descr = "FMOD 3.xx http://www.fmod.org", + .options = fmod_options, + .init = fmod_audio_init, + .fini = fmod_audio_fini, + .pcm_ops = &fmod_pcm_ops, + .can_be_default = 1, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (FMODVoiceOut), + .voice_size_in = sizeof (FMODVoiceIn) }; diff --git a/audio/noaudio.c b/audio/noaudio.c index 9432413..1a7529a 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -160,15 +160,15 @@ static struct audio_pcm_ops no_pcm_ops = { }; struct audio_driver no_audio_driver = { - INIT_FIELD (name = ) "none", - INIT_FIELD (descr = ) "Timer based audio emulation", - INIT_FIELD (options = ) NULL, - INIT_FIELD (init = ) no_audio_init, - INIT_FIELD (fini = ) no_audio_fini, - INIT_FIELD (pcm_ops = ) &no_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (NoVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (NoVoiceIn) + .name = "none", + .descr = "Timer based audio emulation", + .options = NULL, + .init = no_audio_init, + .fini = no_audio_fini, + .pcm_ops = &no_pcm_ops, + .can_be_default = 1, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (NoVoiceOut), + .voice_size_in = sizeof (NoVoiceIn) }; diff --git a/audio/ossaudio.c b/audio/ossaudio.c index bb727d3..97edf9f 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -766,15 +766,15 @@ static struct audio_pcm_ops oss_pcm_ops = { }; struct audio_driver oss_audio_driver = { - INIT_FIELD (name = ) "oss", - INIT_FIELD (descr = ) "OSS http://www.opensound.com", - INIT_FIELD (options = ) oss_options, - INIT_FIELD (init = ) oss_audio_init, - INIT_FIELD (fini = ) oss_audio_fini, - INIT_FIELD (pcm_ops = ) &oss_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (OSSVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (OSSVoiceIn) + .name = "oss", + .descr = "OSS http://www.opensound.com", + .options = oss_options, + .init = oss_audio_init, + .fini = oss_audio_fini, + .pcm_ops = &oss_pcm_ops, + .can_be_default = 1, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (OSSVoiceOut), + .voice_size_in = sizeof (OSSVoiceIn) }; diff --git a/audio/paaudio.c b/audio/paaudio.c index a50fccc..0b469cf 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -501,15 +501,15 @@ static struct audio_pcm_ops qpa_pcm_ops = { }; struct audio_driver pa_audio_driver = { - INIT_FIELD (name = ) "pa", - INIT_FIELD (descr = ) "http://www.pulseaudio.org/", - INIT_FIELD (options = ) qpa_options, - INIT_FIELD (init = ) qpa_audio_init, - INIT_FIELD (fini = ) qpa_audio_fini, - INIT_FIELD (pcm_ops = ) &qpa_pcm_ops, - INIT_FIELD (can_be_default = ) 0, - INIT_FIELD (max_voices_out = ) INT_MAX, - INIT_FIELD (max_voices_in = ) INT_MAX, - INIT_FIELD (voice_size_out = ) sizeof (PAVoiceOut), - INIT_FIELD (voice_size_in = ) sizeof (PAVoiceIn) + .name = "pa", + .descr = "http://www.pulseaudio.org/", + .options = qpa_options, + .init = qpa_audio_init, + .fini = qpa_audio_fini, + .pcm_ops = &qpa_pcm_ops, + .can_be_default = 0, + .max_voices_out = INT_MAX, + .max_voices_in = INT_MAX, + .voice_size_out = sizeof (PAVoiceOut), + .voice_size_in = sizeof (PAVoiceIn) }; diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index dafef5d..6870fdf 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -440,15 +440,15 @@ static struct audio_pcm_ops sdl_pcm_ops = { }; struct audio_driver sdl_audio_driver = { - INIT_FIELD (name = ) "sdl", - INIT_FIELD (descr = ) "SDL http://www.libsdl.org", - INIT_FIELD (options = ) sdl_options, - INIT_FIELD (init = ) sdl_audio_init, - INIT_FIELD (fini = ) sdl_audio_fini, - INIT_FIELD (pcm_ops = ) &sdl_pcm_ops, - INIT_FIELD (can_be_default = ) 1, - INIT_FIELD (max_voices_out = ) 1, - INIT_FIELD (max_voices_in = ) 0, - INIT_FIELD (voice_size_out = ) sizeof (SDLVoiceOut), - INIT_FIELD (voice_size_in = ) 0 + .name = "sdl", + .descr = "SDL http://www.libsdl.org", + .options = sdl_options, + .init = sdl_audio_init, + .fini = sdl_audio_fini, + .pcm_ops = &sdl_pcm_ops, + .can_be_default = 1, + .max_voices_out = 1, + .max_voices_in = 0, + .voice_size_out = sizeof (SDLVoiceOut), + .voice_size_in = 0 }; diff --git a/audio/wavaudio.c b/audio/wavaudio.c index e50dac2..96cc49d 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -248,16 +248,15 @@ static struct audio_pcm_ops wav_pcm_ops = { }; struct audio_driver wav_audio_driver = { - INIT_FIELD (name = ) "wav", - INIT_FIELD (descr = ) - "WAV renderer http://wikipedia.org/wiki/WAV", - INIT_FIELD (options = ) wav_options, - INIT_FIELD (init = ) wav_audio_init, - INIT_FIELD (fini = ) wav_audio_fini, - INIT_FIELD (pcm_ops = ) &wav_pcm_ops, - INIT_FIELD (can_be_default = ) 0, - INIT_FIELD (max_voices_out = ) 1, - INIT_FIELD (max_voices_in = ) 0, - INIT_FIELD (voice_size_out = ) sizeof (WAVVoiceOut), - INIT_FIELD (voice_size_in = ) 0 + .name = "wav", + .descr = "WAV renderer http://wikipedia.org/wiki/WAV", + .options = wav_options, + .init = wav_audio_init, + .fini = wav_audio_fini, + .pcm_ops = &wav_pcm_ops, + .can_be_default = 0, + .max_voices_out = 1, + .max_voices_in = 0, + .voice_size_out = sizeof (WAVVoiceOut), + .voice_size_in = 0 };