raw/cnxk_bphy: use named value for queue count
authorJakub Palider <jpalider@marvell.com>
Mon, 26 Jul 2021 13:58:15 +0000 (08:58 -0500)
committerJerin Jacob <jerinj@marvell.com>
Tue, 28 Sep 2021 10:09:14 +0000 (12:09 +0200)
Queue counter is used in a few places so it was given some
reasonable name.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/raw/cnxk_bphy/cnxk_bphy.c
drivers/raw/cnxk_bphy/cnxk_bphy_irq.h

index affc5c3..030beff 100644 (file)
@@ -51,6 +51,8 @@ bphy_rawdev_selftest(uint16_t dev_id)
        queues = rte_rawdev_queue_count(dev_id);
        if (queues == 0)
                return -ENODEV;
+       if (queues != BPHY_QUEUE_CNT)
+               return -EINVAL;
 
        ret = rte_rawdev_start(dev_id);
        if (ret)
index b55147b..f141677 100644 (file)
@@ -23,10 +23,11 @@ struct bphy_irq_queue {
 };
 
 struct bphy_device {
+#define BPHY_QUEUE_CNT 1
        struct roc_bphy_irq_chip *irq_chip;
        struct bphy_mem mem;
        /* bphy irq interface supports single queue only */
-       struct bphy_irq_queue queues[1];
+       struct bphy_irq_queue queues[BPHY_QUEUE_CNT];
 };
 
 int cnxk_bphy_intr_init(uint16_t dev_id);