Skip to content

Commit

Permalink
tty: remove file from n_tty_ioctl_helper
Browse files Browse the repository at this point in the history
After the previous patch, there are no users of 'file' in
n_tty_ioctl_helper. So remove it also from there.

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210914091134.17426-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jiri Slaby authored and gregkh committed Sep 22, 2021
1 parent dcc223e commit 7c78360
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
break;

default:
err = n_tty_ioctl_helper(tty, file, cmd, arg);
err = n_tty_ioctl_helper(tty, cmd, arg);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp/ppp_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
/* flush our buffers and the serial port's buffer */
if (arg == TCIOFLUSH || arg == TCOFLUSH)
ppp_async_flush_output(ap);
err = n_tty_ioctl_helper(tty, file, cmd, arg);
err = n_tty_ioctl_helper(tty, cmd, arg);
break;

case FIONREAD:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp/ppp_synctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
/* flush our buffers and the serial port's buffer */
if (arg == TCIOFLUSH || arg == TCOFLUSH)
ppp_sync_flush_output(ap);
err = n_tty_ioctl_helper(tty, file, cmd, arg);
err = n_tty_ioctl_helper(tty, cmd, arg);
break;

case FIONREAD:
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/n_gsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,7 @@ static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
base = mux_num_to_base(gsm);
return put_user(base + 1, (__u32 __user *)arg);
default:
return n_tty_ioctl_helper(tty, file, cmd, arg);
return n_tty_ioctl_helper(tty, cmd, arg);
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/n_hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
fallthrough; /* to default */

default:
error = n_tty_ioctl_helper(tty, file, cmd, arg);
error = n_tty_ioctl_helper(tty, cmd, arg);
break;
}
return error;
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file,
up_write(&tty->termios_rwsem);
return put_user(retval, (unsigned int __user *) arg);
default:
return n_tty_ioctl_helper(tty, file, cmd, arg);
return n_tty_ioctl_helper(tty, cmd, arg);
}
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/tty/tty_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,8 @@ int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
}
EXPORT_SYMBOL_GPL(tty_perform_flush);

int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
int n_tty_ioctl_helper(struct tty_struct *tty, unsigned int cmd,
unsigned long arg)
{
int retval;

Expand Down
4 changes: 2 additions & 2 deletions include/linux/tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ static inline int tty_audit_push(void)
#endif

/* tty_ioctl.c */
int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg);
int n_tty_ioctl_helper(struct tty_struct *tty, unsigned int cmd,
unsigned long arg);

/* vt.c */

Expand Down
2 changes: 1 addition & 1 deletion net/nfc/nci/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int nci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
return -EBUSY;
break;
default:
err = n_tty_ioctl_helper(tty, file, cmd, arg);
err = n_tty_ioctl_helper(tty, cmd, arg);
break;
}

Expand Down

0 comments on commit 7c78360

Please sign in to comment.