Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp298966pxj; Wed, 23 Jun 2021 22:44:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFUAVQfpjPSr8Ik8W9+6CBk61XxUM5JiiymS4jqxcN3uiq/UBzJB5w1LNUfyCNsf5d3lwz X-Received: by 2002:aa7:db95:: with SMTP id u21mr4741077edt.152.1624513498119; Wed, 23 Jun 2021 22:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624513498; cv=none; d=google.com; s=arc-20160816; b=TMjM0zl2d4p8MKo4e9mN9x5XbNfqPQsb487DnpWMqTzSbmAEF+p6QtTuX6o84MWLeX Ut9OdxTmpfLxRWzajpCnuyqrt4jCccy0mIzjInGbEx2l9VYAFOc1wkBmrJ1vEtacBhAz wBNhHZVh6GRsF86kV0gUEKddbRPnhWfPFxzKMQCa2iIOuQSSy1bT1O7yheFZEpTDhC2C UrDQl7XAGdAph0q4KqURcRP/iOVEZePdUHD+TRz+dHBy3PK2Mf45SpySxRYAT0XkxzYD DwWUlut8ffIdos+5htG6yNNKjoTLgtdDmbnLi5xfv5nrEyDIq21QImcdi8zYYjszX7o4 NywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VV0KeP8kJr4bhL7sWG5NwyVDETLQCcCFzMooKyaJz9U=; b=FbG8O3pOH+FTwfW5rS+XI+mUh22qLGnqvA3FdcHvOt82i/rRO57v7iFbRVDY8sCCW+ 0NOSYeiHjup0trhagDVeRzMzbdmWyJZLqKGjBxlzVE5qWJ0VBgtL26izWN27WtTBuys6 AxemLzF6F1SJ0vrdYFnoDYSOGibfgvx8HvCCP4hF7Nst5fIfh7T/cavfaEDO41DVKWQy 1wgdgfINzpiJfVntWu6MWQiluqq51tFKg5zKtXLDrk42KM8cFbzAghvYypMixERaRHGN ZCTHPMhjyUZHiisSdDzcaofgUl6Bo/w4OByoTHd7Z0q6kICeOk5+x6e38qUN8W7BVQZr IINg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TKEuNgpf; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yl8si1981040ejb.362.2021.06.23.22.44.35; Wed, 23 Jun 2021 22:44:58 -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=@linuxfoundation.org header.s=korg header.b=TKEuNgpf; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbhFXFny (ORCPT + 99 others); Thu, 24 Jun 2021 01:43:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:54058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbhFXFnx (ORCPT ); Thu, 24 Jun 2021 01:43:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 615A2613E7; Thu, 24 Jun 2021 05:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624513294; bh=zwAa1oXvtNsRyT1TQaWBA4D9GsM7gx8Hoa3hx2a/zOs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TKEuNgpfLnosXquFxao5Ko9V7ZiB578/IVUed7uSE/JUglaFf9fuTiT8wB3hxtBdG 3+k09I8x13S2WP9KQp8lqf0/icasPjUz/oKlSoWG0Rl4kimvneQDV4E9Df9u0mZcTU /Jl+F56OXGBRLsJXLVLerNGISJwVzdpGVdT2YaDo= Date: Thu, 24 Jun 2021 07:41:30 +0200 From: Greg KH To: kan.liang@linux.intel.com Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, namhyung@kernel.org, acme@kernel.org, jolsa@redhat.com, ak@linux.intel.com, rafael.j.wysocki@intel.com Subject: Re: [PATCH 1/7] driver core: Add a way to get to bus devices kset Message-ID: References: <1624497729-158864-1-git-send-email-kan.liang@linux.intel.com> <1624497729-158864-2-git-send-email-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1624497729-158864-2-git-send-email-kan.liang@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 23, 2021 at 06:22:03PM -0700, kan.liang@linux.intel.com wrote: > From: Kan Liang > > Add an accessor function to get to the bus devices kset associated with > a struct bus_type. > > The user of this is the following perf changes, which will need to get > to the kobj of the 'devices' directory of a certain bus. What "following perf changes"? Nothing should be messing with the kobject of a bus, where are those patches? > Reviewed-by: Rafael J. Wysocki > Signed-off-by: Kan Liang > Cc: gregkh@linuxfoundation.org > Cc: rafael.j.wysocki@intel.com > --- > drivers/base/bus.c | 6 ++++++ > include/linux/device/bus.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/drivers/base/bus.c b/drivers/base/bus.c > index 36d0c65..3d621a8 100644 > --- a/drivers/base/bus.c > +++ b/drivers/base/bus.c > @@ -899,6 +899,12 @@ struct kset *bus_get_kset(struct bus_type *bus) > } > EXPORT_SYMBOL_GPL(bus_get_kset); > > +struct kset *bus_get_devices_kset(struct bus_type *bus) > +{ > + return bus->p->devices_kset; > +} > +EXPORT_SYMBOL_GPL(bus_get_devices_kset); No, sorry, this feels really wrong, why does anyone care about the bus kset? thanks, greg k-h