public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jarkko Sonninen <kasper@iki.fi>
Cc: Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: serial: xr: Add TIOCGRS485 and TIOCSRS485 ioctls
Date: Mon, 13 Mar 2023 16:50:03 +0100	[thread overview]
Message-ID: <ZA9GK2bPd9VhomgG@kroah.com> (raw)
In-Reply-To: <71fd009b-8378-d5b0-5243-5279b2b880ee@iki.fi>

On Mon, Mar 13, 2023 at 05:07:59PM +0200, Jarkko Sonninen wrote:
> On 3/13/23 09:53, Greg Kroah-Hartman wrote:
> > On Mon, Mar 13, 2023 at 09:49:26AM +0200, Jarkko Sonninen wrote:
> > > > > +{
> > > > > +	void __user *argp = (void __user *)arg;
> > > > > +
> > > > > +	switch (cmd) {
> > > > > +	case TIOCGRS485:
> > > > > +		return xr_get_rs485_config(tty, argp);
> > > > > +	case TIOCSRS485:
> > > > > +		return xr_set_rs485_config(tty, argp);
> > > > > +	}
> > > > > +	return -ENOIOCTLCMD;
> > > > Wrong ioctl return value :(
> > > What is the correct ioctl error return value ?
> > > ENOIOCTLCMD was used in most places in usb serial as an error return.
> > ENOTTY is the correct one for when an ioctl is not handled by the ioctl
> > call.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Using ENOTTY breaks all other tty ioctls.

What other tty ioctls?

confused,

greg k-h

  reply	other threads:[~2023-03-13 15:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  1:04 [PATCH] USB: serial: xr: Add TIOCGRS485 and TIOCSRS485 ioctls Jarkko Sonninen
2023-03-13  7:00 ` Greg Kroah-Hartman
2023-03-13  7:49   ` Jarkko Sonninen
2023-03-13  7:53     ` Greg Kroah-Hartman
2023-03-13  8:27       ` [PATCH v2] " Jarkko Sonninen
2023-03-13  8:45         ` Greg Kroah-Hartman
2023-03-13  9:54         ` Oliver Neukum
2023-03-13 10:47           ` Jarkko Sonninen
2023-03-13 11:27             ` Oliver Neukum
2023-03-13 23:02         ` David Laight
2023-03-14  6:19         ` kernel test robot
2023-03-13 15:07       ` [PATCH] " Jarkko Sonninen
2023-03-13 15:50         ` Greg Kroah-Hartman [this message]
2023-03-13 15:53           ` Jarkko Sonninen
2023-03-13 20:18           ` Oliver Neukum
2023-03-14  7:00 ` [PATCH v3] " Jarkko Sonninen
2023-03-14  7:37   ` Greg Kroah-Hartman
2023-03-14  8:00     ` Jarkko Sonninen
2023-04-13  8:57     ` Johan Hovold
2023-04-13  8:53   ` Johan Hovold
2023-04-16  8:40     ` Jarkko Sonninen
2023-04-17 14:50       ` Johan Hovold
2023-04-23 18:59         ` [PATCH v4] " Jarkko Sonninen
2023-04-24  5:32           ` kernel test robot
2023-06-20 12:38           ` Johan Hovold
2023-07-06 19:37             ` Jarkko Sonninen
2023-07-20 13:46               ` Johan Hovold
2023-07-08 14:56             ` [PATCH v5] " Jarkko Sonninen
2023-07-20 13:52               ` Johan Hovold

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=ZA9GK2bPd9VhomgG@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kasper@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox