qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] misc: fix __COUNTER__ macro to be referenced properly


From: Eric Blake
Subject: Re: [PATCH] misc: fix __COUNTER__ macro to be referenced properly
Date: Thu, 19 Mar 2020 15:35:42 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/19/20 11:19 AM, address@hidden wrote:
From: danbrodsky <address@hidden>

- __COUNTER__ doesn't work with ## concat
- replaced ## with glue() macro so __COUNTER__ is evaluated

Signed-off-by: danbrodsky <address@hidden>

Thanks - this appears to be your first contribution to qemu.

Typically, the S-o-b should match how you would spell your legal name, rather than being a single-word computer user name.

It looks like you threaded another message to this one:
Message-Id: <address@hidden>
Subject: [PATCH] lockable: replaced locks with lock guard macros where
 appropriate
but without a 0/2 cover letter, or even a 1/2 or 2/2 indicator on the individual patches. This makes it more likely that the second patch may be overlooked by our CI tools.

Since this patch is fixing an issue that just went into the tree recently, it would be useful to add mention of that in the commit message:
Fixes: 3284c3ddc4

In fact, using 'lockable:' rather than 'misc:' as your subject prefix makes it more obvious that you are fixing an issue in the same area as where it was introduced.

More patch submission hints at https://wiki.qemu.org/Contribute/SubmitAPatch

---
  include/qemu/lockable.h | 2 +-
  include/qemu/rcu.h      | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h
index 1aeb2cb1a6..a9258f2c2c 100644
--- a/include/qemu/lockable.h
+++ b/include/qemu/lockable.h
@@ -170,7 +170,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(QemuLockable, 
qemu_lockable_auto_unlock)
   *   }
   */
  #define QEMU_LOCK_GUARD(x) \
-    g_autoptr(QemuLockable) qemu_lockable_auto##__COUNTER__ = \
+    g_autoptr(QemuLockable) glue(qemu_lockable_auto, __COUNTER__) = \

That said, the patch itself is correct.
Reviewed-by: Eric Blake <address@hidden>

I'll leave it up to the maintainer for this file whether they can improve your commit message (although the hardest part of that would be knowing a full proper name to use in place of your username), or if you will need to send a v2.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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