Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1960421rda; Tue, 24 Oct 2023 08:17:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlf4HVUeofWddqiX0FfZjzc5PTkSyRn9+nVzSRrf9a4zhJq/5hF5LI8QoMi2f2rNtK5sg+ X-Received: by 2002:a17:90a:c241:b0:27d:694f:195d with SMTP id d1-20020a17090ac24100b0027d694f195dmr12004791pjx.6.1698160641430; Tue, 24 Oct 2023 08:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698160641; cv=none; d=google.com; s=arc-20160816; b=cM0PzjyVBYHmdJH4cag62yCUzOE5w1IBnYvh+QN7kf40KzyCEM+gi39BfND13kfrxU tTLfYA7PCLQWG+ot+E9/uf7XxqZRCgEwx5WB9NJh2u2KuxKF4cK1wON1VqyJvTgzib9G Hhz/Chyuf64je0a5ecUVcoCtb/QIgOkAP/tA7E9xNuvBodeByBtThsY/0+8lXBcVp/fK 6eqjkb0KE5pTqkjktGU5AqAb8u5dUckOGGK8XrRxaAnU2TZFakgQaY+zhm5paTelLFHa k9IuYURqWUNoKw1t/IViYU0fQn8rnySSZ81snhZAcNud6AH3ttjrX2tkvXsQQm9MnYLI Ppdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=U3kU2PQ9F9xxTxnstcZuABlwGBLe2QQ0gyRfc6TLzWE=; fh=BecneVMAO6TDIe/UpsAyNon7/ODd/CZLv9fVAGI4/KI=; b=hDYqkAPLItzrutr8ADoq/IEZlTeQpMkLkCU0cx7ZD40v4ONN33sy9rqxv/QvWZQEvI UZ4TlkrLejBdEfk2OTm+6ozkdYSZxkuMHkC0ASHE2BhSE+9ESgE7WI6g4bzqp+tTodEw E7XMF59GdbSplRwats6XgMve4MCtjyxc8dUYuDHA6ah5RwSU3P7UDEHmRyPSljKLhe+R wOMoCkCYEv58mfrnTsYnO2Ii5ZlNk6G9QUJPo2ZvZa+6ooF455tGI6dmlnsjYGhCX39Q PjiN6bJUjDiCNgXSDTaq2nd+MU7Llrfwy3mJ7p6F7eGH0AKvhffS7nWyFsSAKzwZX9Vt S8UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CjnFzzFa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ne10-20020a17090b374a00b0027995cf4342si8530134pjb.55.2023.10.24.08.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CjnFzzFa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id EFB9780239EB; Tue, 24 Oct 2023 08:17:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343640AbjJXPRI (ORCPT + 99 others); Tue, 24 Oct 2023 11:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234740AbjJXPRE (ORCPT ); Tue, 24 Oct 2023 11:17:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7623D7A; Tue, 24 Oct 2023 08:16:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF0BAC433BB; Tue, 24 Oct 2023 15:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698160598; bh=O1ZQCaqr3Y1gpsxkAzqO3ZiSI5a5sR0bznxgzARpojM=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=CjnFzzFaAwyXeG6ral0ZKqu5lkYMzvX0J9a2PcXdRWZYsOYCfsPindrt34PP+RY3r 81AWQ0mWDZI3IEJ2BfLeEcIxCvc1lOPt+0Qy5ISeODiYV//yeL+4cZPNJQsD+bxcLY UkMe04C0isuVLemO/DVmCC3oAAeOU37v6oltFq+2DPFLzuc1HnhcveGbmWziglOyLe 5VqPADI+QZtoeryfKv8KarmHB7k/WNA+Kd2ml3Zj0nacSJqBxThePVJ6lmgvLzG9bk uooaZatXH0ckPWsQKYy0fnfUNssV7Is/fQxDRdPUdvGPYtrNvPHhDuQoIhO6sgg788 a4ogzvivw36+A== From: Leon Romanovsky To: jgg@ziepe.ca, Yang Li Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot In-Reply-To: <20231024003815.89742-1-yang.lee@linux.alibaba.com> References: <20231024003815.89742-1-yang.lee@linux.alibaba.com> Subject: Re: [PATCH -next] RDMA/core: Remove NULL check before dev_{put, hold} Message-Id: <169816059429.2308077.13679053435060636033.b4-ty@kernel.org> Date: Tue, 24 Oct 2023 18:16:34 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:17:17 -0700 (PDT) On Tue, 24 Oct 2023 08:38:15 +0800, Yang Li wrote: > The call netdev_{put, hold} of dev_{put, hold} will check NULL, > so there is no need to check before using dev_{put, hold}, > remove it to silence the warning: > > ./drivers/infiniband/core/nldev.c:375:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > > > [...] Applied, thanks! [1/1] RDMA/core: Remove NULL check before dev_{put, hold} https://git.kernel.org/rdma/rdma/c/7a1c2abf9a2be7 Best regards, -- Leon Romanovsky