From: Johan Hovold <johan@kernel.org>
To: Mikhail Zaytsev <flashed@mail.ru>
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case.
Date: Tue, 2 Jan 2018 15:50:47 +0100 [thread overview]
Message-ID: <20180102145047.GL16993@localhost> (raw)
On Wed, Dec 13, 2017 at 04:44:55PM +0300, Mikhail Zaytsev wrote:
> The patch removes unused TIOCSSERIAL ioctl case and adds the default block
> to the switch.
>
> Signed-off-by: Mikhail Zaytsev <flashed@mail.ru>
> ---
> drivers/usb/serial/ark3116.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
> index 23d46ef87..2e957c76f 100644
> --- a/drivers/usb/serial/ark3116.c
> +++ b/drivers/usb/serial/ark3116.c
> @@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
> return -EFAULT;
>
> return 0;
> - case TIOCSSERIAL:
> - if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
> - return -EFAULT;
> - return 0;
> + default:
> + break;
> }
>
> return -ENOIOCTLCMD;
This will make the ioctl return -ENOTTY to user space (e.g. setserial),
which I guess should be fine as TIOCSSERIAL really isn't supported for
these devices currently.
But you should at least mention this changed behaviour in the commit
message.
Please also drop the ".c" part from the subject prefix while at it.
Thanks,
Johan
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Mikhail Zaytsev <flashed@mail.ru>
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case.
Date: Tue, 2 Jan 2018 15:50:47 +0100 [thread overview]
Message-ID: <20180102145047.GL16993@localhost> (raw)
In-Reply-To: <20171213164455.11dd6f8b@zaytsev.tver.pg>
On Wed, Dec 13, 2017 at 04:44:55PM +0300, Mikhail Zaytsev wrote:
> The patch removes unused TIOCSSERIAL ioctl case and adds the default block
> to the switch.
>
> Signed-off-by: Mikhail Zaytsev <flashed@mail.ru>
> ---
> drivers/usb/serial/ark3116.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
> index 23d46ef87..2e957c76f 100644
> --- a/drivers/usb/serial/ark3116.c
> +++ b/drivers/usb/serial/ark3116.c
> @@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
> return -EFAULT;
>
> return 0;
> - case TIOCSSERIAL:
> - if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
> - return -EFAULT;
> - return 0;
> + default:
> + break;
> }
>
> return -ENOIOCTLCMD;
This will make the ioctl return -ENOTTY to user space (e.g. setserial),
which I guess should be fine as TIOCSSERIAL really isn't supported for
these devices currently.
But you should at least mention this changed behaviour in the commit
message.
Please also drop the ".c" part from the subject prefix while at it.
Thanks,
Johan
next reply other threads:[~2018-01-02 14:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 14:50 Johan Hovold [this message]
2018-01-02 14:50 ` [PATCH 1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case Johan Hovold
-- strict thread matches above, loose matches on Subject: below --
2018-01-02 15:00 [2/2] USB: serial: ark3116.c: Move TIOCGSERIAL ioctl case to function Johan Hovold
2018-01-02 15:00 ` [PATCH 2/2] " Johan Hovold
2017-12-13 16:43 USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl Mikhail Zaytsev
2017-12-13 16:43 ` [PATCH] " Mikhail Zaytsev
2017-12-13 14:39 Oliver Neukum
2017-12-13 14:39 ` [PATCH] " Oliver Neukum
2017-12-13 13:45 [2/2] USB: serial: ark3116.c: Move TIOCGSERIAL ioctl case to function Mikhail Zaytsev
2017-12-13 13:45 ` [PATCH 2/2] " Mikhail Zaytsev
2017-12-13 13:44 [1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case Mikhail Zaytsev
2017-12-13 13:44 ` [PATCH 1/2] " Mikhail Zaytsev
2017-12-13 13:44 USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl Mikhail Zaytsev
2017-12-13 13:44 ` [PATCH 0/2] USB: serial: ark3116.c: ioctl changes Mikhail Zaytsev
2017-12-13 12:30 USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl Mikhail Zaytsev
2017-12-13 12:30 ` [PATCH] " Mikhail Zaytsev
2017-12-13 11:40 Oliver Neukum
2017-12-13 11:40 ` [PATCH] " Oliver Neukum
2017-12-13 11:31 Mikhail Zaytsev
2017-12-13 11:31 ` [PATCH] " Mikhail Zaytsev
2017-12-13 11:24 Johan Hovold
2017-12-13 11:24 ` [PATCH] " Johan Hovold
2017-12-13 10:17 Oliver Neukum
2017-12-13 10:17 ` [PATCH] " Oliver Neukum
2017-12-13 9:30 Mikhail Zaytsev
2017-12-13 9:30 ` [PATCH] " Mikhail Zaytsev
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=20180102145047.GL16993@localhost \
--to=johan@kernel.org \
--cc=flashed@mail.ru \
--cc=gregkh@linuxfoundation.org \
--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 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.