Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1602711pxy; Thu, 6 May 2021 11:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV7rJhTnR6g97okXNi2PuAVVAyovxCIu6DJXa2vdgZruySbMrOhjzzqpzIgZtIv6ci3BKC X-Received: by 2002:a63:dc49:: with SMTP id f9mr5460666pgj.361.1620324732795; Thu, 06 May 2021 11:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620324732; cv=none; d=google.com; s=arc-20160816; b=Sru7G8kw8xE1g9rh0tFHgU0ysq8yF+DmQM1bAno7zzOip6i4GpEAPZAJjFVUG9XXcA B4pm4PJFea1djI70nDMbKTa0Ox2JtXBffjkWKTEkzmOe/yaC8exlQjzHUvhmjKQUqYqU MxBO2HRNNPic4ERtEFA5rUzRdqJhDqK4nLqOxaGfWoWfJJkMY08invyEj7JAQS6qVjFz YvZc76lqjO1SbRtgIGmoOT0NT7GyV4c0Yz33hs4r8shbijBjwbxtnzv7Y2QA6lhMcGEA hObrr4E9jFeYVLHeM2BpMXglQ0/L1bBI2mlDC0ZHStPl7ZBcytfmUfwN7CCSZU7tT2PV rqUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GkHS3tM2P3pdBS/mThwr3JryPyXafqq6LHkEQ5YqKuE=; b=i7y5e1oIEdtwQncWH29fONSpGOQ4Pb3JudCnoPx4kyuC1V4QP++2cGAJhH6sS/KKwg zqVQqwt95uNVQsfutJPtvqCMKRux1wpz6lEKJ6m4unqp+FLW0kqKPHWBw8u6J7h7NlC4 i7c+PycTIA1/nUwhJTno2c1MxrjHzy2YprzPByJ3DaAB6jFmT1auFIaUpOK2dMLfZgPp 9UgwamqEFcLw5jKsx0U+GP8kLkHULQB5+ZpeMO+dqrPKQ5iWTJK6B2tFRmwE2ojIL36k v3sMEI/yxbJKKSnU+ORV6cZYdWW3lTyhjHlFlnr6mU9o0ZdE2R1s2CaPfw55jKDBrkSs ff0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vCuhHrvu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si3783232plh.426.2021.05.06.11.11.58; Thu, 06 May 2021 11:12:12 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vCuhHrvu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234711AbhEFLdG (ORCPT + 99 others); Thu, 6 May 2021 07:33:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234603AbhEFLdG (ORCPT ); Thu, 6 May 2021 07:33:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1D6F9613D9; Thu, 6 May 2021 11:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620300727; bh=IFnFYKDkDaVRIdqWKKiKINUs4W6CScJJBZQMfv7J0hg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vCuhHrvuVM9xyINHg7Q+NhXsf24qyF88GmDe4KfpUKMhks5B1u7Axo9JV9nhiwWGW 3ZeCjUQ3FIefjeqm3Xddf8a/ZZllZuK1OPUqvBjIaEp6Cv2aYzS+95wzOI3QVcI5nc xp3wNrIyipc3qJu3DFofHicQIVxjuzS22sWgezsb2XsTFq9D9BeI10U3RWiDdNTUKi iRqyoqbFRrNPRZ1IS35huvHzdNAkqe4nzhC8NabCcodWLXFFPngN1/Ir+nVW9G4t2g zXMq4Xqbq6wq1bhcq6uamyMEQiHYtrtXItrr+v5x4XGBrzTRh/H/WgZBR+BZ8S1DxC +4Z5SaXIY/TQQ== Date: Thu, 6 May 2021 14:32:03 +0300 From: Leon Romanovsky To: Yang Li 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 Subject: Re: [PATCH] RDMA/mlx5: Remove redundant assignment to ret Message-ID: References: <1620296001-120406-1-git-send-email-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1620296001-120406-1-git-send-email-yang.lee@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 06:13:21PM +0800, Yang Li wrote: > 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(-) > Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Thanks, Reviewed-by: Leon Romanovsky