[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] net/vmxnet3: fix debug macro pattern for vm
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] net/vmxnet3: fix debug macro pattern for vmxnet3 |
Date: |
Fri, 4 Dec 2015 06:18:02 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 12/04/2015 02:19 AM, Miao Yan wrote:
> Vmxnet3 uses the following debug macro style:
>
When sending a patch series, it's best to include a 0/2 cover letter
(some of the maintainer tooling works better if it can reply to the
cover letter).
Also, this patch depends on your earlier patch "net/vmxnet3.c: fix a
build error when enabling debug output" in order to not cause a
temporary compile failure; you should state that dependency so that the
patches get applied in the correct order. (Or just make the series be 3
patches, with that one as 1/3)
> #ifdef SOME_DEBUG
> # define debug(...) do{ printf(...); } while (0)
> # else
> # define debug(...) do{ } while (0)
> #endif
>
> If SOME_DEBUG is undefined, then format string inside the
> debug macro will never be checked by compiler. Code will
> likely to break in the future when SOME_DEBUG is enabled
s/will/is
> because of lacking of testing. This patch changes this
s/lacking/lack/
> to the following:
>
> #define debug(...) \
> do { if (SOME_DEBUG_ENABLED) printf(...); } while (0)
>
> Signed-off-by: Miao Yan <address@hidden>
> ---
> hw/net/vmxnet_debug.h | 139
> +++++++++++++++++++++++++++++++-------------------
> 1 file changed, 86 insertions(+), 53 deletions(-)
>
Changes themselves look okay, so with the commit message grammar improved,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature