* [PATCH] audio: Simplify audio_bug() removing old code
@ 2020-12-10 22:35 Philippe Mathieu-Daudé
2020-12-11 7:33 ` Marc-André Lureau
2020-12-15 8:23 ` Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 22:35 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Philippe Mathieu-Daudé,
Gerd Hoffmann, Gerd Hoffmann, Marc-André Lureau
This code (introduced in commit 1d14ffa97ea, Oct 2005)
is likely unused since years. Time to remove it. If
the condition is true, simply call abort().
Suggested-by: Gerd Hoffmann <gerd@kraxel.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
audio/audio.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index 46578e4a583..b71ab8912c5 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -104,9 +104,6 @@ const struct mixeng_volume nominal_volume = {
static bool legacy_config = true;
-#ifdef AUDIO_IS_FLAWLESS_AND_NO_CHECKS_ARE_REQURIED
-#error No its not
-#else
int audio_bug (const char *funcname, int cond)
{
if (cond) {
@@ -119,25 +116,11 @@ int audio_bug (const char *funcname, int cond)
AUD_log (NULL, "I am sorry\n");
}
AUD_log (NULL, "Context:\n");
-
-#if defined AUDIO_BREAKPOINT_ON_BUG
-# if defined HOST_I386
-# if defined __GNUC__
- __asm__ ("int3");
-# elif defined _MSC_VER
- _asm _emit 0xcc;
-# else
- abort ();
-# endif
-# else
- abort ();
-# endif
-#endif
+ abort();
}
return cond;
}
-#endif
static inline int audio_bits_to_index (int bits)
{
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] audio: Simplify audio_bug() removing old code
2020-12-10 22:35 [PATCH] audio: Simplify audio_bug() removing old code Philippe Mathieu-Daudé
@ 2020-12-11 7:33 ` Marc-André Lureau
2020-12-15 8:23 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2020-12-11 7:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-devel, Gerd Hoffmann, Gerd Hoffmann
On Fri, Dec 11, 2020 at 2:35 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> This code (introduced in commit 1d14ffa97ea, Oct 2005)
> is likely unused since years. Time to remove it. If
> the condition is true, simply call abort().
>
> Suggested-by: Gerd Hoffmann <gerd@kraxel.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
It is going to conflict with the patch from "[PATCH v2 00/13] Remove
GCC < 4.8 checks". I'll drop it if yours goes first.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> audio/audio.c | 19 +------------------
> 1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index 46578e4a583..b71ab8912c5 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -104,9 +104,6 @@ const struct mixeng_volume nominal_volume = {
>
> static bool legacy_config = true;
>
> -#ifdef AUDIO_IS_FLAWLESS_AND_NO_CHECKS_ARE_REQURIED
> -#error No its not
> -#else
> int audio_bug (const char *funcname, int cond)
> {
> if (cond) {
> @@ -119,25 +116,11 @@ int audio_bug (const char *funcname, int cond)
> AUD_log (NULL, "I am sorry\n");
> }
> AUD_log (NULL, "Context:\n");
> -
> -#if defined AUDIO_BREAKPOINT_ON_BUG
> -# if defined HOST_I386
> -# if defined __GNUC__
> - __asm__ ("int3");
> -# elif defined _MSC_VER
> - _asm _emit 0xcc;
> -# else
> - abort ();
> -# endif
> -# else
> - abort ();
> -# endif
> -#endif
> + abort();
> }
>
> return cond;
> }
> -#endif
>
> static inline int audio_bits_to_index (int bits)
> {
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] audio: Simplify audio_bug() removing old code
2020-12-10 22:35 [PATCH] audio: Simplify audio_bug() removing old code Philippe Mathieu-Daudé
2020-12-11 7:33 ` Marc-André Lureau
@ 2020-12-15 8:23 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-12-15 8:23 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-devel, Marc-André Lureau
On Thu, Dec 10, 2020 at 11:35:06PM +0100, Philippe Mathieu-Daudé wrote:
> This code (introduced in commit 1d14ffa97ea, Oct 2005)
> is likely unused since years. Time to remove it. If
> the condition is true, simply call abort().
>
> Suggested-by: Gerd Hoffmann <gerd@kraxel.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Added to audio queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-15 8:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 22:35 [PATCH] audio: Simplify audio_bug() removing old code Philippe Mathieu-Daudé
2020-12-11 7:33 ` Marc-André Lureau
2020-12-15 8:23 ` Gerd Hoffmann
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.