diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-02-07 16:26:01 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-02-07 16:26:01 +0000 |
commit | 17a5bbb44df9a4a79166332bc26e2d8ca6bd8fa8 (patch) | |
tree | 3c51588df6d984563c370bdcae0ecc51673b9398 /audio/audio_template.h | |
parent | ea62da0913d20338b8a47bbfaef2e8f2763ee13f (diff) | |
parent | 493d89bf74d17fa304b7a02f531b024df2003fea (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-02-06' into staging
Error reporting patches for 2018-02-06
# gpg: Signature made Tue 06 Feb 2018 19:48:30 GMT
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-2018-02-06:
tcg: Replace fprintf(stderr, "*\n" with error_report()
hw/xen*: Replace fprintf(stderr, "*\n" with error_report()
hw/sparc*: Replace fprintf(stderr, "*\n" with error_report()
hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF()
hw/ppc: Replace fprintf(stderr, "*\n" with error_report()
hw/pci*: Replace fprintf(stderr, "*\n" with error_report()
hw/openrisc: Replace fprintf(stderr, "*\n" with error_report()
hw/moxie: Replace fprintf(stderr, "*\n" with error_report()
hw/mips: Replace fprintf(stderr, "*\n" with error_report()
hw/lm32: Replace fprintf(stderr, "*\n" with error_report()
hw/dma: Replace fprintf(stderr, "*\n" with error_report()
hw/arm: Replace fprintf(stderr, "*\n" with error_report()
audio: Replace AUDIO_FUNC with __func__
error: Improve documentation of error_append_hint()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'audio/audio_template.h')
-rw-r--r-- | audio/audio_template.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h index 99b27b285e..7de227d2d1 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -57,13 +57,13 @@ static void glue (audio_init_nb_voices_, TYPE) (struct audio_driver *drv) glue (s->nb_hw_voices_, TYPE) = max_voices; } - if (audio_bug (AUDIO_FUNC, !voice_size && max_voices)) { + if (audio_bug(__func__, !voice_size && max_voices)) { dolog ("drv=`%s' voice_size=0 max_voices=%d\n", drv->name, max_voices); glue (s->nb_hw_voices_, TYPE) = 0; } - if (audio_bug (AUDIO_FUNC, voice_size && !max_voices)) { + if (audio_bug(__func__, voice_size && !max_voices)) { dolog ("drv=`%s' voice_size=%d max_voices=0\n", drv->name, voice_size); } @@ -77,7 +77,7 @@ static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw) static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw) { - HWBUF = audio_calloc (AUDIO_FUNC, hw->samples, sizeof (struct st_sample)); + HWBUF = audio_calloc(__func__, hw->samples, sizeof(struct st_sample)); if (!HWBUF) { dolog ("Could not allocate " NAME " buffer (%d samples)\n", hw->samples); @@ -105,7 +105,7 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw) samples = ((int64_t) sw->hw->samples << 32) / sw->ratio; - sw->buf = audio_calloc (AUDIO_FUNC, samples, sizeof (struct st_sample)); + sw->buf = audio_calloc(__func__, samples, sizeof(struct st_sample)); if (!sw->buf) { dolog ("Could not allocate buffer for `%s' (%d samples)\n", SW_NAME (sw), samples); @@ -238,17 +238,17 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as) return NULL; } - if (audio_bug (AUDIO_FUNC, !drv)) { + if (audio_bug(__func__, !drv)) { dolog ("No host audio driver\n"); return NULL; } - if (audio_bug (AUDIO_FUNC, !drv->pcm_ops)) { + if (audio_bug(__func__, !drv->pcm_ops)) { dolog ("Host audio driver without pcm_ops\n"); return NULL; } - hw = audio_calloc (AUDIO_FUNC, 1, glue (drv->voice_size_, TYPE)); + hw = audio_calloc(__func__, 1, glue(drv->voice_size_, TYPE)); if (!hw) { dolog ("Can not allocate voice `%s' size %d\n", drv->name, glue (drv->voice_size_, TYPE)); @@ -266,7 +266,7 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as) goto err0; } - if (audio_bug (AUDIO_FUNC, hw->samples <= 0)) { + if (audio_bug(__func__, hw->samples <= 0)) { dolog ("hw->samples=%d\n", hw->samples); goto err1; } @@ -339,7 +339,7 @@ static SW *glue (audio_pcm_create_voice_pair_, TYPE) ( hw_as = *as; } - sw = audio_calloc (AUDIO_FUNC, 1, sizeof (*sw)); + sw = audio_calloc(__func__, 1, sizeof(*sw)); if (!sw) { dolog ("Could not allocate soft voice `%s' (%zu bytes)\n", sw_name ? sw_name : "unknown", sizeof (*sw)); @@ -379,7 +379,7 @@ static void glue (audio_close_, TYPE) (SW *sw) void glue (AUD_close_, TYPE) (QEMUSoundCard *card, SW *sw) { if (sw) { - if (audio_bug (AUDIO_FUNC, !card)) { + if (audio_bug(__func__, !card)) { dolog ("card=%p\n", card); return; } @@ -399,7 +399,7 @@ SW *glue (AUD_open_, TYPE) ( { AudioState *s = &glob_audio_state; - if (audio_bug (AUDIO_FUNC, !card || !name || !callback_fn || !as)) { + if (audio_bug(__func__, !card || !name || !callback_fn || !as)) { dolog ("card=%p name=%p callback_fn=%p as=%p\n", card, name, callback_fn, as); goto fail; @@ -408,12 +408,12 @@ SW *glue (AUD_open_, TYPE) ( ldebug ("open %s, freq %d, nchannels %d, fmt %d\n", name, as->freq, as->nchannels, as->fmt); - if (audio_bug (AUDIO_FUNC, audio_validate_settings (as))) { + if (audio_bug(__func__, audio_validate_settings(as))) { audio_print_settings (as); goto fail; } - if (audio_bug (AUDIO_FUNC, !s->drv)) { + if (audio_bug(__func__, !s->drv)) { dolog ("Can not open `%s' (no host audio driver)\n", name); goto fail; } |