Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1600600pxy; Thu, 6 May 2021 11:09:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwz+Cu7PPw3wcdEUSCuOChAmtvBR66Jd+vZcrJ5f8ATAkLhrnUYytr0jZDA/UtXLW++dA/ X-Received: by 2002:a17:906:5285:: with SMTP id c5mr5832160ejm.282.1620324561627; Thu, 06 May 2021 11:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620324561; cv=none; d=google.com; s=arc-20160816; b=PzXvPTidGjCqWDTCU4b0J1jncd7+/7oGKMNvoaZbXXAqtHM9yued+P1yCnDW4aQF+8 jvQoQCF4dWd3dfX+2SD1ePQvTzLKwZwlTY0BwW6Ak0mA6uBQOh9CTokY9EBMO06hPE4+ 3e+W/2FUq5ez2XFQaz1kWLGoVSCV9a0RXiQokFsoqHqm0jCymMKTF98XYWGzhnPt6Jhi HHF+6GOI0QTaBTQnlN+pJrX0qyEvn1nzwk3RoG0DR6hEt9BhxkIHAl05HBS4bPpVqUKM Rdi+mNcJoNvha/xoHabZHJ3zcEwTzrOLJiOA45aWwJ4oU9jsB1zzNjOlH2Ol57ZmgFRt fTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=TUb02v9GYNPNteihnUwooib3INClHDpQ8YvW99iJ1No=; b=FnmrdAgKLokZkpgJTEcZIAq8Q5BJCNz4jJjJXcej/33KH0hsuRM7UQYl3b8HFQoTse CfjtOF3TISxbo0Se5vZvwy18ttjwu5Fk8IAzGsh3lgQb9gudXslOjFxRjSch0SxCkmC5 oKfZaIB4iIUaffaZUJnlPgQxah2jBsUQvBe2myOi2B5CX3No2EmmvEBJgMyYh9DT1Ux7 g+oKlcnP2jCJeHOLxUVJ7JFyqSPNluyz89WNC3btm17W7UmwzFqs6xUAZdnhd8sD3DW4 dvIyQwkyGUjyGwU+aO3XMMXcKekWU/jXhhRakeuamvV49vgBzhYrk8pG+YNbnpsU2NzC Sl6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si2981533edw.551.2021.05.06.11.08.57; Thu, 06 May 2021 11:09:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233736AbhEFKOY (ORCPT + 99 others); Thu, 6 May 2021 06:14:24 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:41858 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbhEFKOY (ORCPT ); Thu, 6 May 2021 06:14:24 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UXyQ2MH_1620296003; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UXyQ2MH_1620296003) by smtp.aliyun-inc.com(127.0.0.1); Thu, 06 May 2021 18:13:24 +0800 From: Yang Li To: leon@kernel.org Cc: dledford@redhat.com, jgg@ziepe.ca, nathan@kernel.org, ndesaulniers@google.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] RDMA/mlx5: Remove redundant assignment to ret Date: Thu, 6 May 2021 18:13:21 +0800 Message-Id: <1620296001-120406-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'ret' is set to the rerurn value of function mlx5_mr_cache_alloc() but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed Clean up the following clang-analyzer warning: drivers/infiniband/hw/mlx5/odp.c:421:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/infiniband/hw/mlx5/odp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index 782b2af..87fa0b2 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -418,7 +418,7 @@ static struct mlx5_ib_mr *implicit_get_child_mr(struct mlx5_ib_mr *imr, if (IS_ERR(odp)) return ERR_CAST(odp); - ret = mr = mlx5_mr_cache_alloc( + mr = mlx5_mr_cache_alloc( mr_to_mdev(imr), MLX5_IMR_MTT_CACHE_ENTRY, imr->access_flags); if (IS_ERR(mr)) { ib_umem_odp_release(odp); -- 1.8.3.1