Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1202303lqm; Thu, 2 May 2024 08:01:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZq0InNalcQ8keMPtNqU10FreIeDYxnrygXS+MzI0FJn6FiaET+ANkLau1faapM2rwLb24uAaTaW2uc/yBRSa9nQkdruniPWBjhLTuvA== X-Google-Smtp-Source: AGHT+IF0z4pxzyTiNYFoDTZ9q91U2Dr9pTvix+WOyOG5xWKpMNbgF7wOROsx5Jv9fGCtO1cwZocS X-Received: by 2002:a17:90a:e556:b0:2af:58fa:f73b with SMTP id ei22-20020a17090ae55600b002af58faf73bmr5508183pjb.48.1714662102441; Thu, 02 May 2024 08:01:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714662102; cv=pass; d=google.com; s=arc-20160816; b=rx5l0EMa52Nld2BLxx1f7tnJG64aHxSTCZ0LsmIGaVdxX1KbQaNS0UMmc6rrYoXIjh NjB5HGyhjTI6uoZxSbik8aiLnXU93tLwWDXItekDw3eZJzxQa83dv4k/MXyN16PHeFMr DYgg8NvAqmfOnNINiyhfBRL9J3B9FM2twbA71fRUkOq45en0AVFUzJYIM57hfd6r8hDP GuYNKuSdOckZQHtqvWMLXoY+Xuaz8YBAV7MgdP+DlVAacb23URsWC39OGGqCGJawqU4J ssnDmUy+QrsKU9koRL51TKyM2W2SptQA1emhLkvz6SNYwUErfI8jo3zHacJHmA1xkXpv FrPA== 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=4f+GNiqQhLevE4CJWQBb1pL1BmEA2JeaVNBA52s+WsU=; fh=cSfUfXUiGDdSZ6qyJfqbMrPtS2ANisBjszSHukWXK44=; b=NIPec3gDS1i3zq2IDwJWwfjecVuVbNBwfnGvOpHjQRKVlZEjduT/Z0lzWEJDaN87Xu 0golzRWPGAgqs5qkBgJXW/6SDTrJ4zbDYjNThZQkLGwPl8LvM1k83vCDMW6p6jl4fYlB xR/ETUojKtw6vEw+kCs4RN/oqrf7zPXBrn8c7K2xJRorAoYEU+ITaXipC/rp2mRPZ4OD fxsYovSQ+TmOfLbOy/voyVTT7trX8ze+uAjHsjiwSymVtaBYdlZsQfqJlna5NuDDzUz4 UHv60vZMTrBlQpjeMenr2mIBCEBy8vs/Smb9flNSQJAbTqiRHVcC0D6ExqBReiAvo7ez 6l1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5sk7yNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bt17-20020a17090af01100b002b2b98e98bbsi1171039pjb.47.2024.05.02.08.01.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5sk7yNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166596-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E04ED287D35 for ; Thu, 2 May 2024 14:50:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FBDC1649CC; Thu, 2 May 2024 14:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n5sk7yNa" 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 2E108168B0A; Thu, 2 May 2024 14:47:04 +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=1714661225; cv=none; b=cDwF5QiHEq+g6cmGSkweZMZwe3Y/5KDpIRJmaHFEbW1Z+X1h2bC1Ak1S/56nD6OTtmFpPaRemuIcIqZOnaCN9QGsglMDYaLUfbSoGHApKGxrvBZgxmvO7eq2BLN0w+mNwbJOoqDmdu269o8jXuYF2+PjX1SO9iLWEiYj4uuH4Wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714661225; c=relaxed/simple; bh=s7LdIf3gAy6GtEyM8AH+1cJ5Qw5xyeE8/ifqYJCP/6Q=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=bP8n9v/4dS8n2cNIJBIa+RDM+hoE4Y/A9Spm1e0ON1Dynp98DHY1wbDChfnzgHIU92SWyStxE/iPBTJ9gJs5v6Ox91AWQmlm3b5ZKWhbO9CSBc50BXVHddQ9eTY4LtWo8smW4ZpL3JzOeHdyx37FBeHBNY94qVLwGqStsFu1fAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n5sk7yNa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1FD8C113CC; Thu, 2 May 2024 14:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714661224; bh=s7LdIf3gAy6GtEyM8AH+1cJ5Qw5xyeE8/ifqYJCP/6Q=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=n5sk7yNa+nqPYBbADu1mOEHvvzCVrQUhBcaHppjwIXcWrRrwEBxIJgXz8Hg8KQQxk y71FOwwGJwyKBf17ze4UfKp86Jm0EPX4Za4DsTi6u9wJMANSIY8wUB9WbEzs7Aygy9 CnI/QJfX24h/IXMvYIlcwvKolqOqM389www0q+Z5yXfv1bJUhZbiFO4wUJ8PdayOVO mHqvCqjZZMdoQtxwOLiEvZaGbOr+XpwY3Ri30XRXYpZVsboVL94hsLiFiWdT/x5Ng1 Er9y4LuSX2LDaJOyNVbfIR3UurDIaN6RQO1LAYbTCpMSs7ex+iuU2n378IGX5q/Vje pvMBxhVKtRXcA== 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/ipoib: Remove NULL check before dev_{put, hold} Message-Id: <171466121936.1638184.643798566433434250.b4-ty@kernel.org> Date: Thu, 02 May 2024 17:46:59 +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:47:33 +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/ipoib: Remove NULL check before dev_{put, hold} https://git.kernel.org/rdma/rdma/c/e4e40a87024c50 Best regards, -- Leon Romanovsky