Isaku Yamahata schrieb:
> remove #ifdef DEBUG by using macro.
>
> Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>
> Acked-by: Gerd Hoffmann <kra...@redhat.com>
> ---
> hw/pm_smbus.c | 21 ++++++++++++---------
> 1 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/hw/pm_smbus.c b/hw/pm_smbus.c
> index 6ef6b9e..9929d72 100644
> --- a/hw/pm_smbus.c
> +++ b/hw/pm_smbus.c
> @@ -37,6 +37,15 @@
> #define SMBHSTDAT1 0x06
> #define SMBBLKDAT 0x07
>
> +//#define DEBUG
> +
> +#ifdef DEBUG
> +# define SMBUS_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)

Debug output should go to stderr. So this would be even better:

+# define SMBUS_DPRINTF(format, ...) fprintf(stderr, format, ## __VA_ARGS__)

Regards,

Stefan Weil



Reply via email to