From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lina Iyer Subject: Re: [PATCH 6/8] PM / Domains: Abstract genpd locking Date: Thu, 6 Oct 2016 09:56:47 -0600 Message-ID: <20161006155647.GH28930@linaro.org> References: <1475699519-109623-1-git-send-email-lina.iyer@linaro.org> <1475699519-109623-7-git-send-email-lina.iyer@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Received: from mail-pa0-f45.google.com ([209.85.220.45]:34767 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942093AbcJFP4u (ORCPT ); Thu, 6 Oct 2016 11:56:50 -0400 Received: by mail-pa0-f45.google.com with SMTP id rz1so10692065pab.1 for ; Thu, 06 Oct 2016 08:56:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Ulf Hansson Cc: Kevin Hilman , "Rafael J. Wysocki" , "linux-pm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Andy Gross , Stephen Boyd , "linux-arm-msm@vger.kernel.org" , Brendan Jackman , Lorenzo Pieralisi , Sudeep Holla , Juri Lelli On Thu, Oct 06 2016 at 04:56 -0600, Ulf Hansson wrote: >On 5 October 2016 at 22:31, Lina Iyer wrote: >> Abstract genpd lock/unlock calls, in preparation for domain specific >> locks added in the following patches. >> >> Cc: Kevin Hilman >> Cc: Rafael J. Wysocki >> Signed-off-by: Lina Iyer >> Signed-off-by: Ulf Hansson >> --- >> drivers/base/power/domain.c | 121 +++++++++++++++++++++++++++++--------------- >> include/linux/pm_domain.h | 5 +- >> 2 files changed, 85 insertions(+), 41 deletions(-) >> >> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c >> index 52fcdb2..82e6a33 100644 >> --- a/drivers/base/power/domain.c >> +++ b/drivers/base/power/domain.c >> @@ -39,6 +39,46 @@ >> static LIST_HEAD(gpd_list); >> static DEFINE_MUTEX(gpd_list_lock); >> >> +struct genpd_lock_fns { > >May I suggest you to rename the struct to "genpd_lock_ops"? > >I think "*_ops" is in general what we use in the kernel for callbacks >and functions pointers like these. > OK. Thanks, Lina >> + void (*lock)(struct generic_pm_domain *genpd); >> + void (*lock_nested)(struct generic_pm_domain *genpd, int depth); >> + int (*lock_interruptible)(struct generic_pm_domain *genpd); >> + void (*unlock)(struct generic_pm_domain *genpd); >> +}; >> + > >[...] > >Otherwise this looks good to me! > >Kind regards >Uffe