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é <f4...@amsat.org>
---
  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