Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1194632lqm; Thu, 2 May 2024 07:50:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWk6wB226Y3AN0QfOAAlMF/IIz2g7Ty6hZN1zOAxGw7YNnZpqEjACSsVVW4qijT5UC0cdvo1P1A0TKBNrl2THndTevmn+loY+Lc4JjOkA== X-Google-Smtp-Source: AGHT+IFE6KONdJsJIpWQoHwyvOF9fxPd6VB2eIDN9+bd1BQnDpYzHeuO1yFWjlFM/BbyeCBXZwKy X-Received: by 2002:ad4:5bea:0:b0:699:2527:9843 with SMTP id k10-20020ad45bea000000b0069925279843mr5500366qvc.5.1714661403921; Thu, 02 May 2024 07:50:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714661403; cv=pass; d=google.com; s=arc-20160816; b=gv9uSzZE75NYSt/uREVpRnNGfkJULN58MUhb4lsBN0TK9rzrW/yDiMQXu5EO8aIkFt dLcXCZ0vsrNFCkJ+iYLj77VtzQQUL3pm70fCOhdM5W4PCncH9EHT9PGSdhCqXBQ3tbHl XucknMT1/5e5Tw4R8g5Zm2SyztjuF4VhKm0atreyJ4iB+iOqPYe0MgO/bZsuwLCtVDfl f8XLKNv3h8/VhshInf3qiliD5NnUAxiT8lXKRQwMzWa0pw/fN6S/NZvDG/Dlbl491Tq+ CFbsCvLj7Syq0IH62fRjAcL3tuaCcFeGLLvDo3KD5jny8He/ubwJfUwoz/B0Dx7eAOiT h6LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=4fUyF6r9jnDD2tNv5tNo78eA+lWpRPbNmoJqU5WSJrg=; fh=cSfUfXUiGDdSZ6qyJfqbMrPtS2ANisBjszSHukWXK44=; b=UJCT1Z1siAdMhPXPl7mEgkPfr7vQtZnppgarORh2zRHj2boz80h80YiZ6kdZfw6b9e MJOSqciO1yAGg89JTJ1NOm+qwUlJMWhmXS72MRC10f5iXgJHYzjD58odwGNdRj10xvYv MAjtnZxUua5iJaE/9bRzqH9vOm0MmNCIljtIHnkmV/okSweZEBNiceOtkvPhDkTolYc5 zZBI0NblK+PvkhHLod0UMoZlc0AHdL9Mpp18ynPANN1RRIIMOJHVAI7tEe4yZ3Dttk38 k+4n59bB8bX2qWS2p904arb9cPP6xfgZLXuOG24qWrXkE4KA31zByZgmNtmOf+G8ukJB bcMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mixePdvr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kj22-20020a056214529600b006a0881bf7fbsi1069241qvb.221.2024.05.02.07.50.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 07:50:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mixePdvr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 943AA1C22E35 for ; Thu, 2 May 2024 14:50:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01D6E161304; Thu, 2 May 2024 14:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mixePdvr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36405160781; Thu, 2 May 2024 14:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661219; cv=none; b=oOETRNa9y5VWKGvSXm2uZaQm8tkIf4EPe91LbWO82j+n+dpDM5LvTmFnUasFyHziRstEJVKua41lIqfcLXePb1mmq9WlC6TeNrdfQAtIHsSaaxddJ/hJfPE6sX8Jj/j+HPplhtdUr4gmlxutBGkaROlKgvBXFpfJh9LQP7rtnjo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661219; c=relaxed/simple; bh=V5gXs6TvijArdQBXrnEsdGKdWOcmg2X3CXITyzJl0/A=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=NhAt7O/LB6o/Cv80Rk63HeXngEVMYSRxmChRoAGtopzvDT8ErSQVLIpxS90jOQ97S18TXQLntnqITYzS0WDWyxQfsUBm1qxgfHS76k4kxoLTd8aNV+kpaE43DR4cxm59HEGzV1qBuNW5rBoiipDY+a8SDp9Go2M+53nG6JyhQzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mixePdvr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CABFEC113CC; Thu, 2 May 2024 14:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714661218; bh=V5gXs6TvijArdQBXrnEsdGKdWOcmg2X3CXITyzJl0/A=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=mixePdvr2FIBmbXuS5uAXeHQHbtcWJ0ks9Wj4YukUtFztdOUN9Ab3UJisIMLXvw3i YTsl7GF6WAlS7s9FEnw23EMjfGKMtrzpR0dBaRrsMSdmkhAph0Z+wOKj508ZVDCOfe wEjWSOR32YUWCoJpP5ZQYXLLk+8FWOI1oA7/q1g4K3qtSzMctk/3PQZKzltvYZ/5pu ttP13Bf/8VN1mHE0Dq6Tjgzko90UQMlrNtt3w9oQYZiPodwhlJrPYQI/GMy3kxYyeB O1qsIgDafkSOz4JUwSaOdKUB26RdrHfVl+EJEO7E5eTANqALz1eUdJuG8oDblPtcNM uiX8iIXzCkSmw== From: Leon Romanovsky To: Jules Irenge Cc: jgg@ziepe.ca, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, lishifeng@sangfor.com.cn, gustavoars@kernel.org In-Reply-To: References: Subject: Re: [PATCH] RDMA/mlx5: Remove NULL check before dev_{put, hold} Message-Id: <171466121283.1638184.16945329377468449493.b4-ty@kernel.org> Date: Thu, 02 May 2024 17:46:52 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.14-dev On Wed, 01 May 2024 00:46:42 +0100, Jules Irenge wrote: > Coccinelle reports a warning > > WARNING: NULL check before dev_{put, hold} functions is not needed > > The reason is the call netdev_{put, hold} of dev_{put,hold} will check NULL > There is no need to check before using dev_{put, hold} > > [...] Applied, thanks! [1/1] RDMA/mlx5: Remove NULL check before dev_{put, hold} https://git.kernel.org/rdma/rdma/c/82e966130ddd67 Best regards, -- Leon Romanovsky