qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 11/27] virtio-snd: Add macros for logging


From: Gerd Hoffmann
Subject: Re: [RFC PATCH 11/27] virtio-snd: Add macros for logging
Date: Fri, 30 Apr 2021 11:59:00 +0200

On Thu, Apr 29, 2021 at 05:34:29PM +0530, Shreyansh Chouhan wrote:
> Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
> ---
>  hw/audio/virtio-snd.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
> index caad157705..a93674ea72 100644
> --- a/hw/audio/virtio-snd.c
> +++ b/hw/audio/virtio-snd.c
> @@ -39,6 +39,10 @@
>  #define VIRTIO_SOUND_HDA_FN_NID_OUT 0
>  #define VIRTIO_SOUND_HDA_FN_NID_IN 1
>  
> +#define virtio_snd_log(...) AUD_log("virtio sound info", __VA_ARGS__)
> +#define virtio_snd_warn(...) AUD_log("virtio sound warn", __VA_ARGS__)
> +#define virtio_snd_err(...) AUD_log("virtio sound err", __VA_ARGS__)

Warnings and errors meant for the user should use error_report() and
warn_report().

For most debug messages it is better to use tracepoints instead.

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]