[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160422155941.23e1d05b@lxorguk.ukuu.org.uk>
Date: Fri, 22 Apr 2016 15:59:41 +0100
From: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...eaurora.org>,
linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
arnd.bergmann@...aro.org, andrew@...n.ch,
gregory.clement@...e-electrons.com, jason@...edaemon.net,
sebastian.hesselbarth@...il.com,
thomas.petazzoni@...e-electrons.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / OPP: -ENOSYS is applicable only to syscalls
On Fri, 22 Apr 2016 14:42:31 +0200
"Rafael J. Wysocki" <rjw@...ysocki.net> wrote:
> On Friday, April 22, 2016 08:46:51 AM Viresh Kumar wrote:
> > Some of the routines have use -ENOSYS, which is supposed to be used only
> > for syscalls. Replace that with -EINVAL.
>
> -EINVAL specifically means "invalid argument".
>
> What about using -ENXIO instead?
That specifically means "device not present", but might be reasonable.
Quite a bit of the kernel uses EOPNOTSUPP (operation not supported).
Before you change it though please check how existing userspace does
error handling. It's nice to use more "correct" error codes, but that's
not sufficient reason if it turns out that existing user space checks for
ENOSYS for example.
Alan
Powered by blists - more mailing lists