提交 450f0650 编写于 作者: C Christophe JAILLET 提交者: Jakub Kicinski

octeontx2-af: Simplify a size computation in rvu_npc_exact_init()

We know that table_size = table->mem_table.depth * table->mem_table.ways,
so use it instead, it is less verbose.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5230dabe27f48948a9fd0f50a62e2437b65e6a6e.1669378798.git.christophe.jaillet@wanadoo.frSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 6d135d9e
...@@ -1913,7 +1913,7 @@ int rvu_npc_exact_init(struct rvu *rvu) ...@@ -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__); 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, table->id_bmap = devm_bitmap_zalloc(rvu->dev, table->tot_ids,
GFP_KERNEL); GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册