From patchwork Fri Jun 11 16:00:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 12316087 X-Patchwork-Delegate: jgg@ziepe.ca 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=ham 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 54EE2C48BD1 for ; Fri, 11 Jun 2021 16:01:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 386A361248 for ; Fri, 11 Jun 2021 16:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbhFKQDl (ORCPT ); Fri, 11 Jun 2021 12:03:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbhFKQDL (ORCPT ); Fri, 11 Jun 2021 12:03:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8396E613F9; Fri, 11 Jun 2021 16:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623427273; bh=PNugdwjkUZoLaNdfxU2actNEEGYYe41d04vO/Xty504=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=De5gHpL5aOA4bKOkyAKCsiaGoABsgzM3sR64qIXeDsVGFo5mWZymQBDiI4zt8D/Se 3lhpuPvVMzApWhRfcmjZBZSapRS73h3KnHGL7bJp6yqwZRYaThg76a2Ls6qdLMxuzd RdP5bItAR5ZjUMT8u71Is/kSHB575p073iiCqduhDoEa3PeUGs5HI9qvwKn6pNADLJ nOnsZ9hQABp2AdjblzlHhEdiIcIoVBSwjylc8EaNbC4Aa8dq9SPOPARuC6Wu8ZyKFq lQQzybUQWjAt17UsQqYj8HANGH+CHDPcOs81acS/srpPOY2Udtobr7B5SaYXffSPu6 5d2NPxRcJTO6A== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Greg KH , Kees Cook , Nathan Chancellor , Leon Romanovsky , 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 v2 08/15] RDMA/core: Remove the kobject_uevent() NOP Date: Fri, 11 Jun 2021 19:00:27 +0300 Message-Id: <49231c92c7d4c60686de18f7e20932d0c82160ee.1623427137.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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;