[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V12 24/27] pm_smbus: remove #ifdef DEBUG.
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] [PATCH V12 24/27] pm_smbus: remove #ifdef DEBUG. |
Date: |
Thu, 7 Jan 2010 08:51:13 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Wed, Jan 06, 2010 at 12:42:28PM +0100, Stefan Weil wrote:
> Isaku Yamahata schrieb:
> > remove #ifdef DEBUG by using macro.
> >
> > Signed-off-by: Isaku Yamahata <address@hidden>
> > Acked-by: Gerd Hoffmann <address@hidden>
> > ---
> > 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__)
>
Yes, in general.
However the original code sends debug output to stdout and
Most of debug output goes to stdout than stderr. You can easily
see it by greping with DEBUG.
So at this time, I'd like to send debug output to stdout.
(And hopefully later create a framework and make debug output go
to stderr consistently over sources.)
--
yamahata
- [Qemu-devel] [PATCH V12 00/27] split out piix specific part from pc emulator and some clean ups, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 23/27] pci hotadd, acpi_piix4: remove global variables., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 11/27] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 09/27] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 25/27] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 01/27] acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 05/27] acpi_piix4: remove unused variable in get_pmsts()., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 27/27] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V12 12/27] pc: make pc_init1() not refer ferr_irq directly., Isaku Yamahata, 2010/01/05