lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 May 2014 14:16:22 +0100
From:	Sudeep Holla <sudeep.holla@....com>
To:	Viresh Kumar <viresh.kumar@...aro.org>,
	"rjw@...ysocki.net" <rjw@...ysocki.net>
CC:	Sudeep Holla <sudeep.holla@....com>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arvind Chauhan <Arvind.Chauhan@....com>,
	"inderpal.s@...sung.com" <inderpal.s@...sung.com>,
	"nm@...com" <nm@...com>,
	"chander.kashyap@...aro.org" <chander.kashyap@...aro.org>,
	"pavel@....cz" <pavel@....cz>,
	"len.brown@...el.com" <len.brown@...el.com>
Subject: Re: [PATCH V2 1/7] opp: remove -ENOSYS from dummy implementation
 of of_init_opp_table()

Hi Viresh,

$subject perhaps should be "replace/remove -EINVAL.." instead of "remove
-ENOSYS ..."

On 21/05/14 12:09, Viresh Kumar wrote:
> When any of CONFIG_PM_OPP or CONFIG_OF isn't enabled we have a dummy
> implementation of of_init_opp_table() routine, it returns -EINVAL currently.
> -EINVAL can be returned from other places within the real implementations of
> of_init_opp_table() and so caller wouldn't be able to differentiate between
> those two cases.
>
> Make it return -ENOSYS instead for better handling.
>
[Nit] How about "it's more appropriate to return -ENOSYS as since the function
is not implemented" ?

Otherwise it looks fine to me.
Reviewed-by: Sudeep Holla <sudeep.holla@....com>

> Suggested-by: Sudeep Holla <sudeep.holla@....com>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
>   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
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ