Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3075678pxj; Mon, 7 Jun 2021 01:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpYaapzYuTs8OtHH7Fj7kWUOI8/II+oDCn4NDK2xJs1DyKZEAeRkO/mTMTf4CF5ibud0o2 X-Received: by 2002:a17:906:3b10:: with SMTP id g16mr17146702ejf.232.1623054131627; Mon, 07 Jun 2021 01:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623054131; cv=none; d=google.com; s=arc-20160816; b=S2+POntircEhlyjh6IbUYqtaAndAQCAIJzWiZYwaKb7k5qcxq+VjPkERmsf6pjgmOW fuHp5lESCzs61xkhbHzac9PumXHBnjt3LC/tBDA4NnP8kZGb/tF7GTy786v29dV35mjC 4LhVPqnf1ODx/oGaDdIIBKSOCpKq+IViUWRgWNN1zg1CGO30/EbdZ+kqUcwVf1ECobvs wPeYnq5SoJ2JWdDfwApmZB5kzZHvjAJF9nF6bkRqrtmNPOfLZyqgZKVEElqJvTwjbYWo mukfpWunoU7shu5kqfcSGhwbSF0qI1f3HBYi1NXnH3BOQNgboi9kBWqfR6tCsw4TckFt A2WA== 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=STH0C42LudtVTTkeOMV2F78dvBM4/HkqSSiJgEYzxUi+0AFqPc0NcHRgPY1HFlc6jT RxGanJF7VqzNyqjvSChlWkeEK8aecYQGCSRsq1zCPoEnZ3dtdvxODu4vUIPIAffYiZd0 LtYyB+7LCkrmCHmjfPZqWZ8CGyfgCShM3lwqC4FqpEXnZFM5xahPvK3ZYJdxzs0GQ86I nlfgTDuONeaKzrlnTNGzpf8+WIttiFt5Z44tU2rB0wODu1SELlbKkJtrky0jdW4EJWMc 1yfzbZR33O0AJ5Vygknaa2x9doIDNQb4iEriqZ5XSEoPVDbIjuTvA0534vK45aSUeTDW HQPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=niLf7MtP; 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 t7si10044263ejx.540.2021.06.07.01.21.49; Mon, 07 Jun 2021 01:22: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=niLf7MtP; 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 S230406AbhFGIUW (ORCPT + 99 others); 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