From: Eli Cohen Date: Thu, 31 Oct 2013 13:26:31 +0000 (+0200) Subject: IB/mlx5: Remove dead code X-Git-Tag: Ubuntu-5.13.0-19.19~21110^2^7~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7e2e19210a8bbbcacd31e8ce4a0ea64e3ac37dea;p=mirror_ubuntu-jammy-kernel.git IB/mlx5: Remove dead code The value of the local variable index is never used in reg_mr_callback(). Signed-off-by: Eli Cohen [ Remove now-unused variable delta too. - Roland ] Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 2c4626f7b1b8..039c3e40fcb4 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -72,14 +72,8 @@ static void reg_mr_callback(int status, void *context) int c = order2idx(dev, mr->order); struct mlx5_cache_ent *ent = &cache->ent[c]; u8 key; - unsigned long delta = jiffies - mr->start; - unsigned long index; unsigned long flags; - index = find_last_bit(&delta, 8 * sizeof(delta)); - if (index == 64) - index = 0; - spin_lock_irqsave(&ent->lock, flags); ent->pending--; spin_unlock_irqrestore(&ent->lock, flags);