From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbeDIHxr (ORCPT ); Mon, 9 Apr 2018 03:53:47 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37810 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbeDIHxp (ORCPT ); Mon, 9 Apr 2018 03:53:45 -0400 X-Google-Smtp-Source: AIpwx48Cep3Q2n0CWERJimzqkMYL9VvZ5cJAk/xoYPf1hLpyQBgsboiHnVyixpXtmGjmMqBsRCbFUQ== Date: Mon, 9 Apr 2018 13:23:42 +0530 From: Viresh Kumar To: Ulf Hansson Cc: Kevin Hilman , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Linux PM , Stephen Boyd , Nishanth Menon , Vincent Guittot , Rob Herring , Rajendra Nayak , Sudeep Holla , Linux Kernel Mailing List Subject: Re: [PATCH 3/7] PM / Domain: Add struct device to genpd Message-ID: <20180409075342.GB7671@vireshk-i7> References: <20180322095903.h7hgm3xylq3esjyf@vireshk-mac-ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-03-18, 11:18, Ulf Hansson wrote: > On 22 March 2018 at 10:59, Viresh Kumar wrote: > > On 22-03-18, 10:30, Ulf Hansson wrote: > >> On 22 December 2017 at 08:26, Viresh Kumar wrote: > >> > + ret = device_add(&genpd->dev); > >> > >> What's the point of adding the device? Can we skip this step, as I > >> guess the opp core is only using the device as cookie rather actual > >> using it? No? > > > > We also use it for the OPP debugfs stuff, so that would be required I believe. > > Right, however, isn't that only using the dev_name(dev), which you > don't need to add the device to make use of. > > Or maybe I missing something around this... So I tested this bit. The code works fine even if the device isn't added (registered), but this looks a bit sloppy to attempt. Please let me know what would you prefer in this case, add the device or not. -- viresh