Skip to content

Commit

Permalink
octeontx2-af: Simplify a size computation in rvu_npc_exact_init()
Browse files Browse the repository at this point in the history
We know that table_size = table->mem_table.depth * table->mem_table.ways,
so use it instead, it is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5230dabe27f48948a9fd0f50a62e2437b65e6a6e.1669378798.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Christophe JAILLET authored and Jakub Kicinski committed Dec 1, 2022
1 parent 6d135d9 commit 450f065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ int rvu_npc_exact_init(struct rvu *rvu)

dev_dbg(rvu->dev, "%s: Allocated bitmap for 32 entry cam\n", __func__);

table->tot_ids = (table->mem_table.depth * table->mem_table.ways) + table->cam_table.depth;
table->tot_ids = table_size + table->cam_table.depth;
table->id_bmap = devm_bitmap_zalloc(rvu->dev, table->tot_ids,
GFP_KERNEL);

Expand Down

0 comments on commit 450f065

Please sign in to comment.