Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp854771lqh; Sun, 5 May 2024 05:13:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcS9Ann8IL1FOYiKoA74Lndj7bvufN7720EwiG7ntKMNGVpmK8pNS9HO9hiy1fxV5R5xuzOo1ljxsC46y3O19N3IU/WYfHrseajIyJmQ== X-Google-Smtp-Source: AGHT+IFIpQRUN5KMmyDTJSGb040YXVpjBlq1Qt9WtRzUFNVKLLb7bYCXJGS8wvjxRooOTgxa1ZiA X-Received: by 2002:a05:6512:33d6:b0:515:fc44:b3f7 with SMTP id d22-20020a05651233d600b00515fc44b3f7mr8026674lfg.24.1714911235781; Sun, 05 May 2024 05:13:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714911235; cv=pass; d=google.com; s=arc-20160816; b=kI+XbQSfTPTCTe4iHLnAYhoq5M3KXkb0zEWUTxm0to49Kc12qHMkG/UB7fVJojv/g8 tFo1OuWOdu55vI/F2vDmPwgmk7uwMROeV2qE8vD1XTdVaafXWAdpxz3WochRoY8nrFen Cl3GMDeGZFqZxDN4+WX4clmH7UBCNULsS610ImTrLD/F35XtMrUp+rnxwEPw9KbIYMQK PGYYeTf6OL/rnewsVsifRfbdrPpL2zIpxOnJOB890qDO67SKTg0GuaZ6XPCy5RJJhlgZ 0JxURGQlrdzntwoikziY1OnXR/xAWWmOyoAazpBl/LCFI+qXSWLfHhoxVBxkKovkFvoT Q/NA== 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=Ir9RMITHN0vMWSALFwJrdnCXJKCxThkU8outhh6VDP0=; fh=4IcTP1ZDXNrknvEjYZ/7U7Kjn7pLsEFzYeA4MBTbIKM=; b=AIUjzhCehubhLD/n8aSnmK+DObWN11j19Rl/UoxjMFs/xSW/D1fHtYMgc3ZcNfR2PG e+K8t4wi/vkltB7775SyxlHitMpya2NWnh3QDcbVuD23O+3UZqDPZu93Ee7mA5CtyW4V KcOwtzOjwsywj2P+bSZIxpNpJzJNnt/0hf0MJnnWcym5ryKV7ILzUgX9FNNANDYyFqzX YadOXPWKc7BV0ri4887FZ8Z9zQa9Cz7UsX0hm0k4gbrkIu56MK0G4DSjQjQyQCW6W4Ss 4pHgDC/EU7pRLJIKbYPCQBuFHqn4Q0EfdZERB+JUrbxGCIexcJw7mQkdETchAopM1C38 eejQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gLSEKPTx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r6-20020a056402034600b0056e249c1609si3731713edw.235.2024.05.05.05.13.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 05:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gLSEKPTx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168966-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 65F9F1F2146E for ; Sun, 5 May 2024 12:13:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F6401B7FD; Sun, 5 May 2024 12:13:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gLSEKPTx" 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 851F31803D; Sun, 5 May 2024 12:13:46 +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=1714911226; cv=none; b=iEIL6ISL4zQ+htptaXo3fo/7uMz2JonoQsCCN8cZ/dxoC9ED7uDBXJAkx10JejX4lF/BCZ6IV6u9dJHlph9suWt+YncneCaBUG6EiHIrUq9FPKSbQaAn47nOohawfwezMCn/iElrUjkP+7yqnL2Se1lvQghbbgA1URY4z2o3sQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714911226; c=relaxed/simple; bh=hJpY86AyHtVkkFtw1zFI3XC2dz7W9a3/ELeMztaohCw=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=nxxBcdfFVCwjwvitfbDe6dX790eYj98AFRvgUt8LzhSla2rRsLfzWy0KbPPMUCclUd5q90BUWtACKLx10cbaF+DzTIAD7/0rofxdlzSmZm7trE4+k8wrALP2xXZgUptbmy8896Xslows1ZxCOrz0gfZDwLnXVDPNqfje6dOju7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gLSEKPTx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85810C113CC; Sun, 5 May 2024 12:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714911226; bh=hJpY86AyHtVkkFtw1zFI3XC2dz7W9a3/ELeMztaohCw=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=gLSEKPTxicJ8mXorBejAdGX74ORKAtvY/kIC2ld2p6+aP2aZYWJcbBgTOpPTmj5IC dDr+X5gYotLrqEKUImfELKTK+qFuiHSQQbX0D6bc65XJ4YEOTAP8xa5tlQSFfAB/jx Obtz4M/IBmvcLtuF9DhQ4MHah/l/22GNOnfN7e1V5SE/8QiSjJaPWV4Vhtxygnj8Mg DxQzv9DAQM0k/a708ourQDOldukYaEWU10utZ+5dHtAZgRpgljXqmvkIeEnsXgirtK BwjElezbz8eV7YxYqioVPDAW17jXT0Ewi1qEamlkPJqAEknBq+2eTmANro6HL/yM/Y 9JPrec03C0aXw== From: Leon Romanovsky To: Jules Irenge Cc: jgg@ziepe.ca, wenglianfa@huawei.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, lishifeng@sangfor.com.cn, gustavoars@kernel.org In-Reply-To: References: Subject: Re: [PATCH v2] RDMA/core: Remove NULL check before dev_{put, hold} Message-Id: <171491122159.97333.18239115209845838657.b4-ty@kernel.org> Date: Sun, 05 May 2024 15:13:41 +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 Tue, 30 Apr 2024 23:47:45 +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/core: Remove NULL check before dev_{put, hold} https://git.kernel.org/rdma/rdma/c/48d80b484491f1 Best regards, -- Leon Romanovsky