qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH 10/29] net/rocker: use QEMU_IS_ALIGNED macro


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-trivial] [PATCH 10/29] net/rocker: use QEMU_IS_ALIGNED macro
Date: Fri, 21 Jul 2017 13:23:15 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/18/2017 02:51 PM, Eric Blake wrote:
On 07/18/2017 01:09 AM, Philippe Mathieu-Daudé wrote:
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
  hw/net/rocker/rocker.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index 4f0f6d71e5..55228f2f52 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -1419,7 +1419,7 @@ static int pci_rocker_init(PCIDevice *dev)
              desc_ring_set_consume(ring, cmd_consume, ROCKER_MSIX_VEC_CMD);
          } else if (i == ROCKER_RING_EVENT) {
              desc_ring_set_consume(ring, NULL, ROCKER_MSIX_VEC_EVENT);
-        } else if (i % 2 == 0) {
+        } else if (QEMU_IS_ALIGNED(i, 2)) {
              desc_ring_set_consume(ring, tx_consume,
                                    ROCKER_MSIX_VEC_TX((i - 2) / 2));
          } else if (i % 2 == 1) {


Given the if chain, I think you don't want this one.

Indeed, dropped. Thanks for your review!




reply via email to

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