From: Shannon Nelson <snel...@pensando.io>
Date: Mon, 22 Jul 2019 14:40:09 -0700

> The ionic interrupt model is based on interrupt control blocks
> accessed through the PCI BAR.  Doorbell registers are used by
> the driver to signal to the NIC that requests are waiting on
> the message queues.  Interrupts are used by the NIC to signal
> to the driver that answers are waiting on the completion queues.
> 
> Signed-off-by: Shannon Nelson <snel...@pensando.io>

After applying this patch we get a warning:

drivers/net/ethernet/pensando/ionic/ionic_lif.c:33:13: warning: 
‘ionic_intr_free’ defined but not used [-Wunused-function]
 static void ionic_intr_free(struct lif *lif, int index)
             ^~~~~~~~~~~~~~~
drivers/net/ethernet/pensando/ionic/ionic_lif.c:15:12: warning: 
‘ionic_intr_alloc’ defined but not used [-Wunused-function]
 static int ionic_intr_alloc(struct lif *lif, struct intr *intr)
            ^~~~~~~~~~~~~~~~

Also:

> +     lif->dbid_inuse = kzalloc(BITS_TO_LONGS(lif->dbid_count) * sizeof(long),
> +                               GFP_KERNEL);

You can use bitmap_alloc() and friends from linux/bitmap.h for this kind of 
stuff.

Reply via email to