Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbeABOuu (ORCPT + 1 other); Tue, 2 Jan 2018 09:50:50 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:38014 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbeABOus (ORCPT ); Tue, 2 Jan 2018 09:50:48 -0500 X-Google-Smtp-Source: ACJfBovUVQcoT99SS8YZAsegt6l9VsCpnfhoBTCa2CVXn1C/UcKjjrUwqWzfp7gb5e++5exm4w0A8A== Date: Tue, 2 Jan 2018 15:50:47 +0100 From: Johan Hovold To: Mikhail Zaytsev Cc: Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL ioctl case. Message-ID: <20180102145047.GL16993@localhost> References: <20171213123004.4619000a@zaytsev.tver.pg> <20171213112445.GB3831@localhost> <20171213164455.11dd6f8b@zaytsev.tver.pg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171213164455.11dd6f8b@zaytsev.tver.pg> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 > --- > 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