Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp691897pxj; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwl1xNHpOvusGskFmEYRSMfVtHalFOj3dtPKsI7W6dgWSaACfJl6LgPab9L0hMBnELOpDl X-Received: by 2002:a05:6402:645:: with SMTP id u5mr4538221edx.293.1623427511114; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623427511; cv=none; d=google.com; s=arc-20160816; b=Hm56qH0pNkEaPBUyQuzdYuZH1atr6b2/yecwjBH3wCKHkyTy3vc9xsiGA6g8tdmfXJ Y0x5A0ipl4obTSX/eyrWsiZk6sdS+U+ZjG6hR3kU/2weuV/+qwpgJ8FLmh4EqBgSQQoQ h6FGRU1OKLi87aFf+/0R98A2tYJYVth6mlSqa2hdfesFW7IWCKD/WV56DVHhGO4KY2dx BHnCw7x62fb3hzw2vKULDTSnmaUwJIMuK3wPcjs4zK3+rJe8rj4MwUmpdGKePTI65Du7 U6aK2pvQg+VQuCrLycU47SSeQS0W2Vhsuut7mk2G858hoYZJ3G7YhqQOwf/Gzwg6/HM6 3Hsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A7a+S8m8bCU/tgkatnTxXNMRuRJ2qxt6GlRF+LRjeZY=; b=m2VDqM+UW0G3m2UJdng/2VXDmdKRnJQ6iz00SnuAfw6a/Etx6x+FjTaW6Az/CaR8Lh nx6m8dOkn05+byyV8xBJgU2ipyNUg0LdTWa64yIM6k93V3qwu/iThNS3D6osXT3oCDu7 riShwZuDV0LAbIf1WU8rE7wwbSS+A99+rZ07/Y+iIwtnbouNEbvmHo/QvoLuVHz0aobi GzvLz7r0QabC8v2N8/U1fLg5g65O8K0UEv3Xg5uKx5klwpsvxy3SN9iyezQfKQoRarle eE58CMdwDYaQ4MTwcdLDRcTlxaYBYNeMiMQ58eG7B488zSX1XjepbO1Qu/N60e4GFZ8L ylmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=De5gHpL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si5097934edi.558.2021.06.11.09.04.45; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=De5gHpL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231844AbhFKQDm (ORCPT + 99 others); Fri, 11 Jun 2021 12:03:42 -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 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