Skip to content

Commit b1552a4

Browse files
emuslndavem330
authored andcommitted
ionic: remove the dbid_inuse bitmap
The dbid_inuse bitmap is not useful in this driver so remove it. Fixes: 6461b44 ("ionic: Add interrupts and doorbells") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 43cfed7 commit b1552a4

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3014,8 +3014,6 @@ void ionic_lif_free(struct ionic_lif *lif)
30143014
/* unmap doorbell page */
30153015
ionic_bus_unmap_dbpage(lif->ionic, lif->kern_dbpage);
30163016
lif->kern_dbpage = NULL;
3017-
kfree(lif->dbid_inuse);
3018-
lif->dbid_inuse = NULL;
30193017

30203018
mutex_destroy(&lif->config_lock);
30213019
mutex_destroy(&lif->queue_lock);
@@ -3215,22 +3213,12 @@ int ionic_lif_init(struct ionic_lif *lif)
32153213
return -EINVAL;
32163214
}
32173215

3218-
lif->dbid_inuse = bitmap_zalloc(lif->dbid_count, GFP_KERNEL);
3219-
if (!lif->dbid_inuse) {
3220-
dev_err(dev, "Failed alloc doorbell id bitmap, aborting\n");
3221-
return -ENOMEM;
3222-
}
3223-
3224-
/* first doorbell id reserved for kernel (dbid aka pid == zero) */
3225-
set_bit(0, lif->dbid_inuse);
32263216
lif->kern_pid = 0;
3227-
32283217
dbpage_num = ionic_db_page_num(lif, lif->kern_pid);
32293218
lif->kern_dbpage = ionic_bus_map_dbpage(lif->ionic, dbpage_num);
32303219
if (!lif->kern_dbpage) {
32313220
dev_err(dev, "Cannot map dbpage, aborting\n");
3232-
err = -ENOMEM;
3233-
goto err_out_free_dbid;
3221+
return -ENOMEM;
32343222
}
32353223

32363224
err = ionic_lif_adminq_init(lif);
@@ -3273,9 +3261,6 @@ int ionic_lif_init(struct ionic_lif *lif)
32733261
ionic_lif_reset(lif);
32743262
ionic_bus_unmap_dbpage(lif->ionic, lif->kern_dbpage);
32753263
lif->kern_dbpage = NULL;
3276-
err_out_free_dbid:
3277-
kfree(lif->dbid_inuse);
3278-
lif->dbid_inuse = NULL;
32793264

32803265
return err;
32813266
}

drivers/net/ethernet/pensando/ionic/ionic_lif.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ struct ionic_lif {
214214
u32 rx_coalesce_hw; /* what the hw is using */
215215
u32 tx_coalesce_usecs; /* what the user asked for */
216216
u32 tx_coalesce_hw; /* what the hw is using */
217-
unsigned long *dbid_inuse;
218217
unsigned int dbid_count;
219218

220219
struct ionic_phc *phc;

0 commit comments

Comments
 (0)