qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 0/4] imx.31 and KZM board support


From: Peter Chubb
Subject: Re: [Qemu-devel] [PATCH V2 0/4] imx.31 and KZM board support
Date: Sat, 26 Nov 2011 16:21:44 +1100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

>>>>> "Andreas" == Andreas Färber <address@hidden> writes:

Andreas> Am 23.11.2011 01:51, schrieb Peter Chubb:
>>>>>>> "Peter" == Peter Chubb <address@hidden> writes:
>> 
>> 
Peter> All comments received so far have been addressed --- I've added
Peter> a macro, `scream' that gives at most 10 lines of output for OS
Peter> error reporting.
>> 
>> Except I noticed a thinko in the macro.  The decrement should be
>> inside the guard, thus:
>> 
>> #define scream(fmt, args...) \ do { \ static int printable = 10;\
>> if (printable) { \ printable--;\ fprintf(stderr, fmt, ##args); \ }
>> \ } while (0)

Andreas> Another issue:

Andreas> scream("black"); scream("black"); scream("black");
Andreas> scream("black"); scream("black"); scream("black");
Andreas> scream("black"); scream("black"); scream("black");
Andreas> scream("black"); scream("red");

Andreas> To show us "red", in addition to the integer count a
Andreas> duplicate of the string contents would need to be stored and
Andreas> compared to the newly formatted string.

No, because it's a macro.  Each time it appears the static count is
instantiated--- so there's a count for each call site.

Andreas> If we want to do this, it should go into a central file so
Andreas> that it can be reused and centrally maintained.

Agree -- but do we want to do this?

For this patch series, Peter M says to just use hw_error() (even
though he really doesn't like it).

Peter C



reply via email to

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