linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Sa, Nuno" <Nuno.Sa@analog.com>
Cc: Paul Cercueil <paul@crapouillou.net>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandru Ardelean <ardeleanalex@gmail.com>
Subject: Re: [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check
Date: Mon, 3 May 2021 12:07:32 +0100	[thread overview]
Message-ID: <20210503120732.50f1aee0@jic23-huawei> (raw)
In-Reply-To: <20210503120615.64b396bd@jic23-huawei>

+CC Alexandru Ardelean


On Mon, 3 May 2021 12:06:15 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Wed, 28 Apr 2021 15:33:21 +0000
> "Sa, Nuno" <Nuno.Sa@analog.com> wrote:
> 
> > > From: Sa, Nuno <Nuno.Sa@analog.com>
> > > Sent: Wednesday, April 28, 2021 5:31 PM
> > > To: Paul Cercueil <paul@crapouillou.net>; Jonathan Cameron
> > > <jic23@kernel.org>; Lars-Peter Clausen <lars@metafoo.de>; Peter
> > > Meerwald-Stadler <pmeerw@pmeerw.net>
> > > Cc: linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org
> > > Subject: RE: [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check
> > > 
> > >     
> > > > From: Paul Cercueil <paul@crapouillou.net>
> > > > Sent: Wednesday, April 28, 2021 5:08 PM
> > > > To: Jonathan Cameron <jic23@kernel.org>; Lars-Peter Clausen
> > > > <lars@metafoo.de>; Peter Meerwald-Stadler
> > > > <pmeerw@pmeerw.net>
> > > > Cc: linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org; Paul
> > > > Cercueil <paul@crapouillou.net>
> > > > Subject: [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check
> > > >
> > > >
> > > > The ioctrl() call will return errno=EINVAL if the device does not
> > > > support the events interface, and not ENODEV.
> > > >
> > > > Signed-off-by: Paul Cercueil <paul@crapouillou.net>    
> > > 
> > > Reviewed-by: Nuno Sa <nuno.sa@analog.com>
> > >     
> > 
> > I guess this should have a Fixes: tag...  
> 
> So, I did a bit of detective work on this one.  Seems this change in error
> code was actually introduced as a side effect of Alex's recent rework of
> the IOCTLs.  Prior to that we returned -ENODEV for this case and now
> we do indeed return EINVAL.   
> 
> So we may need to figure out how to fix that, or decide that such is life
> and modify this code to give the right error message as done in this patch...
> 
> Linus / Alex, thoughts?  It's always been a bit messy because we also
> return -ENODEV in the path where the ioctl hits a driver that is going away
> so it hasn't uniquely identified a lack of support for a long time, even
> if that is by far the most likely reason for this return code.
> 
> Jonathan
> 
> 
> > 
> > - Nuno Sá  
> 


  reply	other threads:[~2021-05-03 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 15:08 [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check Paul Cercueil
2021-04-28 15:30 ` Sa, Nuno
2021-04-28 15:33   ` Sa, Nuno
2021-05-03 11:06     ` Jonathan Cameron
2021-05-03 11:07       ` Jonathan Cameron [this message]
2021-05-03 13:56       ` Linus Walleij
2021-05-03 14:35         ` Alexandru Ardelean

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=20210503120732.50f1aee0@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Nuno.Sa@analog.com \
    --cc=ardeleanalex@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@crapouillou.net \
    --cc=pmeerw@pmeerw.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).