From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1932EC48BCD for ; Mon, 7 Jun 2021 08:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0083D61205 for ; Mon, 7 Jun 2021 08:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230412AbhFGIUW (ORCPT ); Mon, 7 Jun 2021 04:20:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:35868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbhFGIUU (ORCPT ); Mon, 7 Jun 2021 04:20:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 526C160FF1; Mon, 7 Jun 2021 08:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623053910; bh=PNugdwjkUZoLaNdfxU2actNEEGYYe41d04vO/Xty504=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=niLf7MtPqCoPADAPkl0WztMVMtS+Zn9VDsA40hFsv5gEEmHtUnq40P+EaYOTZebwB e6vASXsDV3JbBeV9hm1LFTG5VmI4K3EPVaDpuwt1MOxGEK9jiybbvFn5S4VP2xYSWc 4htRHvMuqGluUK65ZVByO2QCXHre2EygvdmWcRhiJaaqGzb2ijGoEgKQDtqCNAgRr+ ZoyOkfkLP5otClpCMBv6r9KS2pYwK/mi/+wJFFmhVipOadnLD+q2TKl7nBdPcMknaz Ec60mgA70H82jAnKrVdsC6liGb3ai/Ygd8ZG9nQ8xkJI/3Z1neXdKfst3iPhM95G7K 1wGkT60Tw34lw== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Greg KH , Kees Cook , Nathan Chancellor , Adit Ranadive , Ariel Elior , Christian Benvenuti , clang-built-linux@googlegroups.com, Dennis Dalessandro , Devesh Sharma , Gal Pressman , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Mustafa Ismail , Naresh Kumar PBS , Nelson Escobar , Nick Desaulniers , Potnuri Bharat Teja , Selvin Xavier , Shiraz Saleem , VMware PV-Drivers , Yishai Hadas , Zhu Yanjun Subject: [PATCH rdma-next v1 08/15] RDMA/core: Remove the kobject_uevent() NOP Date: Mon, 7 Jun 2021 11:17:33 +0300 Message-Id: <0d1deca036afe09cdddd9bead8cb6e0a6e52be60.1623053078.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Gunthorpe This call does nothing because the ib_port kobj is nested under a struct device kobject and the dev_uevent_filter() function of the struct device blocks uevents for any children kobj's that are not also struct devices. A uevent for the struct device will be triggered after ib_setup_port_attrs() returns which causes udev to pick up all the deep "attributes" which are implemented as kobjects nested under a struct device and assign them to the udev object for the struct device: $ udevadm info -a /sys/class/infiniband/ibp0s9 ATTR{ports/1/counters/excessive_buffer_overrun_errors}=="0" Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/sysfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 07a00d3d3d44..14b838863b5d 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -1422,8 +1422,6 @@ int ib_setup_port_attrs(struct ib_core_device *coredev) if (ret) goto err_put; } - - kobject_uevent(&port->kobj, KOBJ_ADD); } return 0; -- 2.31.1