All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Matt Ranostay <mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] i2c_check_functionality and error code
Date: Sun, 21 Feb 2016 20:33:17 +0000	[thread overview]
Message-ID: <56CA1F0D.2060707@kernel.org> (raw)
In-Reply-To: <CAKzfze-B4dx9aghERaRDu7xz0i6pMJcAUGMQX7OWJpWh7i=bxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 14/02/16 23:09, Matt Ranostay wrote:
> Jonathan et all,
> 
> Has anyone noticed that there is no clear consensus on which error
> code to return when a i2c_check_functionality() check fails within the
> probe function. I've seen so far ENODEV, ENOTSUPP, EOPNOTSUPP, EIO,
> and ENOSYS in drivers/iio
> 
> Shouldn't these be made a standard value like -ENOTSUPP?
Would make sense - but is this the right choice.

Thought I'd grep HWMON as a possible source of a consensus on this and
got no clear answer.  The most common in there looks to be -ENODEV though
(From the first few pages of results anyway ;)

Hohum. Wolfram what do you think?

Worth cleaning this up?  Perhaps even kernel wise would lead to some
consistency. I've never been that sharp on this in IIO so I can't
really talk ;)

Jonathan


> 
> Thanks,
> 
> Matt
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <mranostay@gmail.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Linux I2C <linux-i2c@vger.kernel.org>
Subject: Re: [RFC] i2c_check_functionality and error code
Date: Sun, 21 Feb 2016 20:33:17 +0000	[thread overview]
Message-ID: <56CA1F0D.2060707@kernel.org> (raw)
In-Reply-To: <CAKzfze-B4dx9aghERaRDu7xz0i6pMJcAUGMQX7OWJpWh7i=bxw@mail.gmail.com>

On 14/02/16 23:09, Matt Ranostay wrote:
> Jonathan et all,
> 
> Has anyone noticed that there is no clear consensus on which error
> code to return when a i2c_check_functionality() check fails within the
> probe function. I've seen so far ENODEV, ENOTSUPP, EOPNOTSUPP, EIO,
> and ENOSYS in drivers/iio
> 
> Shouldn't these be made a standard value like -ENOTSUPP?
Would make sense - but is this the right choice.

Thought I'd grep HWMON as a possible source of a consensus on this and
got no clear answer.  The most common in there looks to be -ENODEV though
(From the first few pages of results anyway ;)

Hohum. Wolfram what do you think?

Worth cleaning this up?  Perhaps even kernel wise would lead to some
consistency. I've never been that sharp on this in IIO so I can't
really talk ;)

Jonathan


> 
> Thanks,
> 
> Matt
> 


  parent reply	other threads:[~2016-02-21 20:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14 23:09 [RFC] i2c_check_functionality and error code Matt Ranostay
     [not found] ` <CAKzfze-B4dx9aghERaRDu7xz0i6pMJcAUGMQX7OWJpWh7i=bxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-21 20:33   ` Jonathan Cameron [this message]
2016-02-21 20:33     ` Jonathan Cameron
     [not found]     ` <56CA1F0D.2060707-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-02-21 22:56       ` Wolfram Sang
2016-02-21 22:56         ` Wolfram Sang
2016-02-24 20:42         ` Jonathan Cameron
2016-02-24 20:42           ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CA1F0D.2060707@kernel.org \
    --to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.