From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939130AbdAIXh4 (ORCPT ); Mon, 9 Jan 2017 18:37:56 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:50992 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756244AbdAIXhz (ORCPT ); Mon, 9 Jan 2017 18:37:55 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org DBBD9613FD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Date: Mon, 9 Jan 2017 15:37:53 -0800 From: Stephen Boyd To: Viresh Kumar Cc: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Patrice Chotard , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: Re: [PATCH 03/12] PM / OPP: Return opp_table from dev_pm_opp_set_*() routines Message-ID: <20170109233753.GV17126@codeaurora.org> References: <32ef11baf0323b81dfb0a3f2371a28ebfb10082b.1481106919.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32ef11baf0323b81dfb0a3f2371a28ebfb10082b.1481106919.git.viresh.kumar@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/07, Viresh Kumar wrote: > Now that we have proper kernel reference infrastructure in place for OPP > tables, use it to guarantee that the OPP table isn't freed while being > used by the callers of dev_pm_opp_set_*() APIs. > > Make them all return the pointer to the OPP table after taking its > reference and put the reference back with dev_pm_opp_put_*() APIs. > > Now that the OPP table wouldn't get freed while these routines are > executing after dev_pm_opp_get_opp_table() is called, there is no need > to take opp_table_lock. Drop them as well. > > Remove the rcu specific comments from these routines as they aren't > relevant anymore. > > Note that prototypes of dev_pm_opp_{set|put}_regulators() were already > updated by another patch. > > Signed-off-by: Viresh Kumar > --- Reviewed-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project