diff mbox series

[06/10] thunk.c: clean up commented out definition

Message ID 20181004161852.11673-7-crosa@redhat.com (mailing list archive)
State New, archived
Headers show
Series Trivial fixes and clean ups | expand

Commit Message

Cleber Rosa Oct. 4, 2018, 4:18 p.m. UTC
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 thunk.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Laurent Vivier Oct. 4, 2018, 4:24 p.m. UTC | #1
Le 04/10/2018 à 18:18, Cleber Rosa a écrit :
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>  thunk.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/thunk.c b/thunk.c
> index d5d8645cd4..e351ae53af 100644
> --- a/thunk.c
> +++ b/thunk.c
> @@ -21,8 +21,6 @@
>  #include "qemu.h"
>  #include "exec/user/thunk.h"
>  
> -//#define DEBUG
> -

Generally we use that to enable easily existing debug traces.

In this case, if you remove the "#define" I think you should also
replace the "#ifdef DEBUG"s by some trace_XXXX() functions.

Thanks,
Laurent
Cleber Rosa Oct. 4, 2018, 4:31 p.m. UTC | #2
On 10/4/18 12:24 PM, Laurent Vivier wrote:
> Le 04/10/2018 à 18:18, Cleber Rosa a écrit :
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>> ---
>>  thunk.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/thunk.c b/thunk.c
>> index d5d8645cd4..e351ae53af 100644
>> --- a/thunk.c
>> +++ b/thunk.c
>> @@ -21,8 +21,6 @@
>>  #include "qemu.h"
>>  #include "exec/user/thunk.h"
>>  
>> -//#define DEBUG
>> -
> 
> Generally we use that to enable easily existing debug traces.
> 

Oh, I wasn't aware that was intentional (I clearly lack some background
here).

> In this case, if you remove the "#define" I think you should also
> replace the "#ifdef DEBUG"s by some trace_XXXX() functions.
> 

Is that desirable? I don't want to disrupt the status quo just because
it looked odd to me.

Thanks!
- Cleber.

> Thanks,
> Laurent
>
Laurent Vivier Oct. 4, 2018, 4:36 p.m. UTC | #3
Le 04/10/2018 à 18:31, Cleber Rosa a écrit :
> 
> 
> On 10/4/18 12:24 PM, Laurent Vivier wrote:
>> Le 04/10/2018 à 18:18, Cleber Rosa a écrit :
>>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>>> ---
>>>  thunk.c | 2 --
>>>  1 file changed, 2 deletions(-)
>>>
>>> diff --git a/thunk.c b/thunk.c
>>> index d5d8645cd4..e351ae53af 100644
>>> --- a/thunk.c
>>> +++ b/thunk.c
>>> @@ -21,8 +21,6 @@
>>>  #include "qemu.h"
>>>  #include "exec/user/thunk.h"
>>>  
>>> -//#define DEBUG
>>> -
>>
>> Generally we use that to enable easily existing debug traces.
>>
> 
> Oh, I wasn't aware that was intentional (I clearly lack some background
> here).
> 
>> In this case, if you remove the "#define" I think you should also
>> replace the "#ifdef DEBUG"s by some trace_XXXX() functions.
>>
> 
> Is that desirable? I don't want to disrupt the status quo just because
> it looked odd to me.

Yes, it's better to have trace_XXX() functions than DEBUG macros. The
change is trivial (add the format strings in ./trace-events and call
them from thunk.c with the existing parameters)

Thanks,
Laurent
diff mbox series

Patch

diff --git a/thunk.c b/thunk.c
index d5d8645cd4..e351ae53af 100644
--- a/thunk.c
+++ b/thunk.c
@@ -21,8 +21,6 @@ 
 #include "qemu.h"
 #include "exec/user/thunk.h"
 
-//#define DEBUG
-
 static unsigned int max_struct_entries;
 StructEntry *struct_entries;