[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210503120732.50f1aee0@jic23-huawei>
Date: Mon, 3 May 2021 12:07:32 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: "Sa, Nuno" <Nuno.Sa@...log.com>
Cc: Paul Cercueil <paul@...pouillou.net>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandru Ardelean <ardeleanalex@...il.com>
Subject: Re: [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check
+CC Alexandru Ardelean
On Mon, 3 May 2021 12:06:15 +0100
Jonathan Cameron <jic23@...nel.org> wrote:
> On Wed, 28 Apr 2021 15:33:21 +0000
> "Sa, Nuno" <Nuno.Sa@...log.com> wrote:
>
> > > From: Sa, Nuno <Nuno.Sa@...log.com>
> > > Sent: Wednesday, April 28, 2021 5:31 PM
> > > To: Paul Cercueil <paul@...pouillou.net>; Jonathan Cameron
> > > <jic23@...nel.org>; Lars-Peter Clausen <lars@...afoo.de>; Peter
> > > Meerwald-Stadler <pmeerw@...erw.net>
> > > Cc: linux-iio@...r.kernel.org; linux-kernel@...r.kernel.org
> > > Subject: RE: [PATCH] tools/iio: iio_event_monitor: Fix ioctl error check
> > >
> > >
> > > > From: Paul Cercueil <paul@...pouillou.net>
> > > > Sent: Wednesday, April 28, 2021 5:08 PM
> > > > To: Jonathan Cameron <jic23@...nel.org>; Lars-Peter Clausen
> > > > <lars@...afoo.de>; Peter Meerwald-Stadler
> > > > <pmeerw@...erw.net>
> > > > Cc: linux-iio@...r.kernel.org; linux-kernel@...r.kernel.org; Paul
> > > > Cercueil <paul@...pouillou.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@...pouillou.net>
> > >
> > > Reviewed-by: Nuno Sa <nuno.sa@...log.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á
>
Powered by blists - more mailing lists