linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case.
@ 2017-12-13 13:44 Mikhail Zaytsev
  0 siblings, 0 replies; 2+ messages in thread
From: Mikhail Zaytsev @ 2017-12-13 13:44 UTC (permalink / raw)
  To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case.
@ 2018-01-02 14:50 Johan Hovold
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2018-01-02 14:50 UTC (permalink / raw)
  To: Mikhail Zaytsev; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-02 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-02 14:50 [1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13 13:44 Mikhail Zaytsev

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).