Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2858429rwb; Wed, 30 Nov 2022 11:52:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5roOy/l0Q+C+8ceGDwI+7DGQFmgHhqMSR7Ehh7rneJQhbcAPbMrmVmswpPcG/iX8s1UvyF X-Received: by 2002:a05:6402:1156:b0:467:374e:5f9b with SMTP id g22-20020a056402115600b00467374e5f9bmr39953318edw.283.1669837968649; Wed, 30 Nov 2022 11:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669837968; cv=none; d=google.com; s=arc-20160816; b=FlAX4piy3G6WYy029AQ6nyb+yw5VcTsDeRZvTzseTHqKYOecTRvo5KTNqtvsYcsNzB Pt7vTLmT8FkMymRoG2p7iKPUe2s8I4eTU8s5vvfelax3DAfopjqrR7RvpxaEMBmSeEcg ZJJQDo+qyoMfQJWfCcpJb5hre1ZHbMBcpoXblPhEWRKVZFvnqzLjaOz90DYRFp9KeGXO v7YLWgewKFKlmmb+feURh8ShoD/4Y0G5FKgmdZiAMAVpcXhgl2pu8R4R9Oo3s41n3CIZ Axp+g6ps9TCFePo7RW3nKV9UHd4rfiwvk9vgKS1gFBoi3MiM0vunkUm3Ckj4jhd8ilCe oWYg== 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=eDgZTI+KYD71vIz2ngJnNI8DbgvoMkqABaVZkZ7w1YI=; b=N45WCOQMaFzbCJRPV9kfQagwWB49Bd5Ts6Apvexu2uql9/qJ/e0tO+UOKTK2ZIRghl 5cKxwbrlWuEQmAUE/0v30UoVpkAKsjsqe4NZhKQyHOHI78hAKEA0beEOWkOEKW0IMUYn w14+JbviC1MeJP+5B3YObxERm+8mtXxL9h+/qEAgk3sywZYTERtDo41lf4e7iZkPG22j CXd7JTinF4i9wCijDZUuG0Rv+k1XuXy3IwdbyOPO3+DCRQ4zoXL9g4Kt+nMEGTnInyND j+S4z7mMbVs1cLtGTym9FYZcduVUrycVR+2VR5Y1YOS1CGBw4sbp6LGO+BqehW9pR4uG W72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GuPHEYHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb40-20020a170907962800b0078034101c0esi2106486ejc.978.2022.11.30.11.52.27; Wed, 30 Nov 2022 11:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GuPHEYHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229571AbiK3TN0 (ORCPT + 83 others); Wed, 30 Nov 2022 14:13:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiK3TNY (ORCPT ); Wed, 30 Nov 2022 14:13:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AEBC578E2; Wed, 30 Nov 2022 11:13:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 53617B81CA9; Wed, 30 Nov 2022 19:13:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 536A0C433D6; Wed, 30 Nov 2022 19:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669835601; bh=5a0Wi1tTOl2eI+PZ0VBS9tDcKn+vlFyK3kLgB4S5xpE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GuPHEYHd/50QpxiURBEqLIgUpcIx7xsMsnsYOQzTO/MBnEWZa5Uead+1cWLzYy9ii H58urSlqsgIRN1Zi4tQbKtyW0UVaQoeMvTKIa4iMtpICAX31mE4k9tI7YGNm/UR0Kl IrM4IxySVYQY/mH0Dh2uit2JUnDc4NuxYGTwGMNBUOkaUFpNe/sHc8/wWW6o2p95Hx Qnz038wBIm9GOWLUwuo5tQijFpPnt61xR+yq4gU9ss7qIPeM77IkzCh020dVC9MzlQ u+DRiesz9kkSJ9N5qXpVsCtTnX8Iv/xHodRcVqW761qRsOSxQ94Lt02FU8h6pgMVKP 9juN6uYWUSNzg== Date: Wed, 30 Nov 2022 21:13:16 +0200 From: Leon Romanovsky To: Jakub Kicinski Cc: zhang.songyi@zte.com.cn, saeedm@nvidia.com, pabeni@redhat.com, davem@davemloft.net, edumazet@google.com, mbloch@nvidia.com, maorg@nvidia.com, elic@nvidia.com, jerrliu@nvidia.com, cmi@nvidia.com, vladbu@nvidia.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net/mlx5: remove NULL check before dev_{put, hold} Message-ID: References: <202211301541270908055@zte.com.cn> <20221130092516.024873db@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130092516.024873db@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 30, 2022 at 09:25:16AM -0800, Jakub Kicinski wrote: > On Wed, 30 Nov 2022 11:00:34 +0200 Leon Romanovsky wrote: > > On Wed, Nov 30, 2022 at 03:41:27PM +0800, zhang.songyi@zte.com.cn wrote: > > > From: zhang songyi > > > > > > The call netdev_{put, hold} of dev_{put, hold} will check NULL, > > > so there is no need to check before using dev_{put, hold}. > > > > > > Fix the following coccicheck warning: > > > /drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c:1450:2-10: > > > WARNING: > > > WARNING NULL check before dev_{put, hold} functions is not needed. > > > > > > Signed-off-by: zhang songyi > > > --- > > > drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > Please change all places in mlx5 in one patch. > > Your call as a mlx5 maintainer, but I'd say don't change them at all. I'm fine with one patch per-driver, I'm not fine with one patch per-line :). > All these trivial patches are such a damn waste of time. IMHO, it is valuable changes for actively developed code. Thanks