diff options
author | Alistair Francis <alistair.francis@xilinx.com> | 2018-02-03 09:43:02 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-02-06 18:26:42 +0100 |
commit | 470bcabd8f56b950c8b9c7a0531d62d3b85978c0 (patch) | |
tree | 511a7b500bb5ec157c99d43efefee7ed844ffdb0 /audio/audio_pt_int.c | |
parent | 508de4780c69d967868afa926215a662791e8b50 (diff) |
audio: Replace AUDIO_FUNC with __func__
Apparently we don't use __MSC_VER as a compiler anymore and we always
require a C99 compiler (which means we always have __func__) so we don't
need a special AUDIO_FUNC macro. We can just replace AUDIO_FUNC with
__func__ instead.
Checkpatch failures were manually fixed.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180203084315.20497-2-armbru@redhat.com>
Diffstat (limited to 'audio/audio_pt_int.c')
-rw-r--r-- | audio/audio_pt_int.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/audio/audio_pt_int.c b/audio/audio_pt_int.c index 21ff9c5803..3fe56d8514 100644 --- a/audio/audio_pt_int.c +++ b/audio/audio_pt_int.c @@ -31,7 +31,7 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *), err = sigfillset (&set); if (err) { - logerr (p, errno, "%s(%s): sigfillset failed", cap, AUDIO_FUNC); + logerr(p, errno, "%s(%s): sigfillset failed", cap, __func__); return -1; } @@ -57,8 +57,8 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *), err2 = pthread_sigmask (SIG_SETMASK, &old_set, NULL); if (err2) { - logerr (p, err2, "%s(%s): pthread_sigmask (restore) failed", - cap, AUDIO_FUNC); + logerr(p, err2, "%s(%s): pthread_sigmask (restore) failed", + cap, __func__); /* We have failed to restore original signal mask, all bets are off, so terminate the process */ exit (EXIT_FAILURE); @@ -74,17 +74,17 @@ int audio_pt_init (struct audio_pt *p, void *(*func) (void *), err2: err2 = pthread_cond_destroy (&p->cond); if (err2) { - logerr (p, err2, "%s(%s): pthread_cond_destroy failed", cap, AUDIO_FUNC); + logerr(p, err2, "%s(%s): pthread_cond_destroy failed", cap, __func__); } err1: err2 = pthread_mutex_destroy (&p->mutex); if (err2) { - logerr (p, err2, "%s(%s): pthread_mutex_destroy failed", cap, AUDIO_FUNC); + logerr(p, err2, "%s(%s): pthread_mutex_destroy failed", cap, __func__); } err0: - logerr (p, err, "%s(%s): %s failed", cap, AUDIO_FUNC, efunc); + logerr(p, err, "%s(%s): %s failed", cap, __func__, efunc); return -1; } @@ -94,13 +94,13 @@ int audio_pt_fini (struct audio_pt *p, const char *cap) err = pthread_cond_destroy (&p->cond); if (err) { - logerr (p, err, "%s(%s): pthread_cond_destroy failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_cond_destroy failed", cap, __func__); ret = -1; } err = pthread_mutex_destroy (&p->mutex); if (err) { - logerr (p, err, "%s(%s): pthread_mutex_destroy failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_mutex_destroy failed", cap, __func__); ret = -1; } return ret; @@ -112,7 +112,7 @@ int audio_pt_lock (struct audio_pt *p, const char *cap) err = pthread_mutex_lock (&p->mutex); if (err) { - logerr (p, err, "%s(%s): pthread_mutex_lock failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_mutex_lock failed", cap, __func__); return -1; } return 0; @@ -124,7 +124,7 @@ int audio_pt_unlock (struct audio_pt *p, const char *cap) err = pthread_mutex_unlock (&p->mutex); if (err) { - logerr (p, err, "%s(%s): pthread_mutex_unlock failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_mutex_unlock failed", cap, __func__); return -1; } return 0; @@ -136,7 +136,7 @@ int audio_pt_wait (struct audio_pt *p, const char *cap) err = pthread_cond_wait (&p->cond, &p->mutex); if (err) { - logerr (p, err, "%s(%s): pthread_cond_wait failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_cond_wait failed", cap, __func__); return -1; } return 0; @@ -148,12 +148,12 @@ int audio_pt_unlock_and_signal (struct audio_pt *p, const char *cap) err = pthread_mutex_unlock (&p->mutex); if (err) { - logerr (p, err, "%s(%s): pthread_mutex_unlock failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_mutex_unlock failed", cap, __func__); return -1; } err = pthread_cond_signal (&p->cond); if (err) { - logerr (p, err, "%s(%s): pthread_cond_signal failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_cond_signal failed", cap, __func__); return -1; } return 0; @@ -166,7 +166,7 @@ int audio_pt_join (struct audio_pt *p, void **arg, const char *cap) err = pthread_join (p->thread, &ret); if (err) { - logerr (p, err, "%s(%s): pthread_join failed", cap, AUDIO_FUNC); + logerr(p, err, "%s(%s): pthread_join failed", cap, __func__); return -1; } *arg = ret; |