From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932551AbaE2WUW (ORCPT ); Thu, 29 May 2014 18:20:22 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:40903 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321AbaE2WUV (ORCPT ); Thu, 29 May 2014 18:20:21 -0400 Message-ID: <5387B287.5050007@ti.com> Date: Thu, 29 May 2014 17:19:51 -0500 From: Nishanth Menon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Viresh Kumar , CC: , , , , , , , , Subject: Re: [PATCH V4 1/8] opp: of_init_opp_table(): return -ENOSYS when feature isn't implemented References: <231be85cd01bcdc00a0a7936cd9ba57ccba52749.1401191054.git.viresh.kumar@linaro.org> In-Reply-To: <231be85cd01bcdc00a0a7936cd9ba57ccba52749.1401191054.git.viresh.kumar@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org minor (Rafael usually fixes it up, but still): $subject: PM / OPP: On 05/27/2014 06:50 AM, Viresh Kumar wrote: > When none of CONFIG_PM_OPP or CONFIG_OF is enabled we use the dummy > implementation of of_init_opp_table() routine, which returns -EINVAL currently. > -EINVAL can confuse the callers a bit as it can have other meanings for the > actual implementation of this routine. > > It is more appropriate to return -ENOSYS instead to avoid confusion at caller. > > Suggested-and-reviewed-by: Sudeep Holla > Signed-off-by: Viresh Kumar otherwise, Acked-by: Nishanth Menon > --- > include/linux/pm_opp.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h > index 0330217..6668150 100644 > --- a/include/linux/pm_opp.h > +++ b/include/linux/pm_opp.h > @@ -112,7 +112,7 @@ int of_init_opp_table(struct device *dev); > #else > static inline int of_init_opp_table(struct device *dev) > { > - return -EINVAL; > + return -ENOSYS; > } > #endif > > -- Regards, Nishanth Menon